Color image or video processing

ABSTRACT

The present invention relates generally to color image processing. One claim recites a method comprising: determining a plurality of color attributes associated with video or imagery; determining which samples representing the video or imagery should receive digital watermarking based on the plurality of color attributes; transforming at least some of the samples into a transform domain; and utilizing a programmed electronic processor, modifying transform domain coefficients representing the samples to hide the digital watermarking therein. Of course other claims and combinations are provided as well.

RELATED APPLICATION DATA

This application is a continuation of U.S. patent application Ser. No.12/145,277, filed Jun. 24, 2008 (U.S. Pat. No. 7,693,300), which is acontinuation of U.S. patent application Ser. No. 10/613,913 filed Jul.3, 2003 (U.S. Pat. No. 7,391,880), which is a continuation of U.S.patent application Ser. No. 09/553,084 filed Apr. 19, 2000 (U.S. Pat.No. 6,590,996), which is a continuation in part of U.S. patentapplication Ser. No. 09/503,881 filed Feb. 14, 2000 (U.S. Pat. No.6,614,914). Each of the above patent documents is hereby incorporated byreference.

TECHNICAL FIELD

The invention relates to image processing and specifically relates tocolor image processing.

BACKGROUND AND SUMMARY

In color image processing applications, it is useful to understand howhumans perceive colors. By understanding the human visual system and itssensitivity to certain colors, one can more effectively create andmanipulate images to create a desired visual effect. This assertion isparticularly true in image processing applications that intentionallyalter an image to perform a desired function, like hiding information inan image or compressing an image. In digital watermarking, for example,one objective is to encode auxiliary information into a signal, such asan image or video sequence, so that the auxiliary information issubstantially imperceptible to humans in an output form of the signal.Similarly, image compression applications seek to decrease the amount ofdata required to represent an image without introducing noticeableartifacts.

One aspect of present disclosure relates to selective color masking ofimages. One example is a method for mapping a change in an imageattribute such as luminance or chrominance to a change in colorcomponents such that the change is less visible. This form of colormasking is particularly useful in watermark encoding applications, butapplies to other applications as well.

A color masking method may be incorporated into a watermark encoder toreduce visibility of a watermark. The watermark encodes auxiliaryinformation in an image by modifying attributes of image samples in theimage. As part of the encoding process, the encoder computes a change inan image attribute, such as luminance, to an image sample to encodeauxiliary information in the image. It changes color values of the imagesample to effect the change in luminance with minimized impact onvisibility.

In one implementation, a mapping process transforms a change in an imagesample attribute, such as luminance, to a change in color components ofthe image sample based on the color values of the image sample. Themapping process may be implemented with a look up table, where the imagesample color values are used to look up a corresponding change in colorvalues. For images represented as an array of color vectors (e.g., colortriplets like Red Green Blue or Cyan Magenta Yellow), the look up tablemay be implemented as a multidimensional look up table with colorvectors used to index a corresponding change in the color values of theimage samples. The mapping process may transform a change in an imagesample attribute to an absolute change in the color values of thesample, or to a relative change, such as a scale factor. To effect achange in an image sample, for example, the mapping process uses thecolor of an image sample to look up a scale factor for each of the colorvalues of the image sample. It uses this scale factor, along with thedesired change in the image attribute, to compute an absolute change inthe color values.

Another aspect of the disclosure is a color masking method that may beused in digital watermark and other applications. The method reads thecolor values of an image sample and a corresponding change of anattribute of the image sample. Based on the color values of the imagesample, the method maps the change in the image sample attribute to achange in color components of the image sample. The change in the colorcomponents is equivalent to the change in the image sample attribute,yet reduces visibility of the change for the specific color values ofthe image sample. The image sample attribute may be luminance,chrominance, or some other attribute.

Another aspect of the disclosure is the use of a color key to determinevalidity of a watermark in an image. The color key indicates how anattribute of image sample is changed to encode a watermark based on thecolor of that image sample. Since a watermark encoded using this colorkey is dependent on the color key and the specific color values of theimage in which it is embedded, the color key can be used to checkwhether a watermark is valid in an image suspected of containing awatermark. For example, if the watermark is forged without the knowledgeof the key or copied from a different image, then the decoder is likelyto determine that the watermark has not been encoded in the colorchannels specified by the color key. An invalid watermark will likely beweak in the color channels specified by the key. As such, invalidwatermarks found in the wrong color channels or having a weak signalstrength in the correct color channels as indicated by the key areconsidered to be invalid.

Another aspect of the disclosure is a user interface method that enablesa user to control the strength of a watermark in specified colors orcolor regions of an image. The user interface enables the user tospecify the color or color regions to embed a watermark signal more orless strongly than other colors. The transition into selected colorregions is made less visible, by smoothly changing the signal strengthdepending on the distance from the selected color region. Also, itenables the user to select the color region by selecting pixels havingthe desired color in the image to be watermarked.

The color masking technology outlined above applies to image processingoperations performed in the spatial domain as well as in other transformdomains. For example, another aspect of the disclosure is a method thatperforms color adaptive encoding of auxiliary data in transformcoefficients of the image. In this method, image blocks are transformedinto transform coefficients, which are then altered to encode auxiliarydata. The alterations are adaptive to the color of the image becausethey are dependent on the characteristic color of the block to whichthey are made. In one implementation, for example, the average color ofthe block is used to look up the corresponding color channels in whichto embed the watermark.

Another aspect of the disclosure is method including: determining aplurality of color attributes associated with video or imagery;determining which samples representing the video or imagery shouldreceive digital watermarking based on the plurality of color attributes;transforming at least some of the samples into a transform domain; andutilizing a programmed electronic processor, modifying transform domaincoefficients representing the samples to hide the digital watermarkingtherein.

Still another aspect is an apparatus comprising: electronic memory forstoring a plurality of color attributes associated with video orimagery; and an electronic processor. The electronic processor isprogrammed for: determining which samples representing the video orimagery should receive digital watermarking based on the plurality ofcolor attributes; transforming at least some of the samples into atransform domain; and utilizing a programmed electronic processor,modifying transform domain coefficients representing the samples to hidethe digital watermarking therein.

Further features of the disclosure will become apparent with referenceto the following detailed description and accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a watermark system.

FIG. 2 is a block diagram illustrating a watermark embedder.

FIG. 3 is a spatial frequency domain plot of a watermark orientationsignal.

FIG. 4 is a flow diagram of a process for detecting a watermark signalin an image and computing its orientation within the image.

FIG. 5 is a flow diagram of a process reading a message encoded in awatermark.

FIG. 6 is a diagram depicting an example of a watermark detectionprocess.

FIG. 7 is a diagram depicting the orientation of a transformed imagesuperimposed over the original orientation of the image at the time ofwatermark encoding.

FIG. 8 is a diagram illustrating an implementation of a watermarkembedder.

FIG. 9 is a diagram depicting an assignment map used to map raw bits ina message to locations within a host image.

FIG. 10 illustrates an example of a watermark orientation signal in aspatial frequency domain.

FIG. 11 illustrates the orientation signal shown in FIG. 10 in thespatial domain.

FIG. 12 is a diagram illustrating an overview of a watermark detectorimplementation.

FIG. 13 is a diagram illustrating an implementation of the detectorpre-processor depicted generally in FIG. 12.

FIG. 14 is a diagram illustrating a process for estimating rotation andscale vectors of a watermark orientation signal.

FIG. 15 is a diagram illustrating a process for refining the rotationand scale vectors, and for estimating differential scale parameters ofthe watermark orientation signal.

FIG. 16 is a diagram illustrating a process for aggregating evidence ofthe orientation signal and orientation parameter candidates from two ormore frames.

FIG. 17 is a diagram illustrating a process for estimating translationparameters of the watermark orientation signal.

FIG. 18 is a diagram illustrating a process for refining orientationparameters using known message bits in the watermark message.

FIG. 19 is a diagram illustrating a process for reading a watermarkmessage from an image, after re-orienting the image data using anorientation vector.

FIG. 20 is a diagram of a computer system that serves as an operatingenvironment for software implementations of a watermark embedder,detector and reader.

FIG. 21 is a diagram illustrating a process for mapping changes in imagesample attributes to changes in color values of the image samples tominimize visibility of the changes.

FIG. 22 is a diagram of a color space depicting how to scale a colorvector to black to effect a change in luminance.

FIG. 23 is a diagram of a color space depicting how to scale a colorvector to white to effect a change in luminance.

FIG. 24 is a diagram of a color space depicting how to scale a colorvector to effect a change in chrominance.

FIG. 25 is a diagram of a color space illustrating a method for enablinga user to control watermark strength based on colors.

DETAILED DESCRIPTION 1.0 Introduction

A watermark can be viewed as an information signal that is embedded in ahost signal, such as an image, audio, or some other media content.Watermarking systems based on the following detailed description mayinclude the following components: 1) An embedder that inserts awatermark signal in the host signal to form a combined signal; 2) Adetector that determines the presence and orientation of a watermark ina potentially corrupted version of the combined signal; and 3) A readerthat extracts a watermark message from the combined signal. In someimplementations, the detector and reader are combined.

The structure and complexity of the watermark signal can varysignificantly, depending on the application. For example, the watermarkmay be comprised of one or more signal components, each defined in thesame or different domains. Each component may perform one or morefunctions. Two primary functions include acting as an identifier tofacilitate detection and acting as an information carrier to convey amessage. In addition, components may be located in different spatial ortemporal portions of the host signal, and may carry the same ordifferent messages.

The host signal can vary as well. The host is typically some form ofmulti-dimensional media signal, such as an image, audio sequence orvideo sequence. In the digital domain, each of these media types isrepresented as a multi-dimensional array of discrete samples. Forexample, a color image has spatial dimensions (e.g., its horizontal andvertical components), and color space dimensions (e.g., YUV or RGB).Some signals, like video, have spatial and temporal dimensions.Depending on the needs of a particular application, the embedder mayinsert a watermark signal that exists in one or more of thesedimensions.

In the design of the watermark and its components, developers are facedwith several design issues such as: the extent to which the mark isimpervious to jamming and manipulation (either intentional orunintentional); the extent of imperceptibility; the quantity ofinformation content; the extent to which the mark facilitates detectionand recovery, and the extent to which the information content can berecovered accurately.

For certain applications, such as copy protection or authentication, thewatermark should be difficult to tamper with or remove by those seekingto circumvent it. To be robust, the watermark must withstand routinemanipulation, such as data compression, copying, linear transformation,flipping, inversion, etc., and intentional manipulation intended toremove the mark or make it undetectable. Some applications require thewatermark signal to remain robust through digital to analog conversion(e.g., printing an image or playing music), and analog to digitalconversion (e.g., scanning the image or digitally sampling the music).In some cases, it is beneficial for the watermarking technique towithstand repeated watermarking.

A variety of signal processing techniques may be applied to address someor all of these design considerations. One such technique is referred toas spreading. Sometimes categorized as a spread spectrum technique,spreading is a way to distribute a message into a number of components(chips), which together make up the entire message. Spreading makes themark more impervious to jamming and manipulation, and makes it lessperceptible.

Another category of signal processing technique is error correction anddetection coding. Error correction coding is useful to reconstruct themessage accurately from the watermark signal. Error detection codingenables the decoder to determine when the extracted message has anerror.

Another signal processing technique that is useful in watermark codingis called scattering. Scattering is a method of distributing the messageor its components among an array of locations in a particular transformdomain, such as a spatial domain or a spatial frequency domain. Likespreading, scattering makes the watermark less perceptible and moreimpervious to manipulation.

Yet another signal processing technique is gain control. Gain control isused to adjust the intensity of the watermark signal. The intensity ofthe signal impacts a number of aspects of watermark coding, includingits perceptibility to the ordinary observer, and the ability to detectthe mark and accurately recover the message from it.

Gain control can impact the various functions and components of thewatermark differently. Thus, in some cases, it is useful to control thegain while taking into account its impact on the message and orientationfunctions of the watermark or its components. For example, in awatermark system described below, the embedder calculates a differentgain for orientation and message components of an image watermark.

Another useful tool in watermark embedding and reading is perceptualanalysis. Perceptual analysis refers generally to techniques forevaluating signal properties based on the extent to which thoseproperties are (or are likely to be) perceptible to humans (e.g.,listeners or viewers of the media content). A watermark embedder cantake advantage of a Human Visual System (HVS) model to determine whereto place an image watermark and how to control the intensity of thewatermark so that chances of accurately recovering the watermark areenhanced, resistance to tampering is increased, and perceptibility ofthe watermark is reduced. Similarly, audio watermark embedder can takeadvantage of a Human Auditory System model to determine how to encode anaudio watermark in an audio signal to reduce audibility. Such perceptualanalysis can play an integral role in gain control because it helpsindicate how the gain can be adjusted relative to the impact on theperceptibility of the mark. Perceptual analysis can also play anintegral role in locating the watermark in a host signal. For example,one might design the embedder to hide a watermark in portions of a hostsignal that are more likely to mask the mark from human perception.

Various forms of statistical analyses may be performed on a signal toidentify places to locate the watermark, and to identify places where toextract the watermark. For example, a statistical analysis can identifyportions of a host image that have noise-like properties that are likelyto make recovery of the watermark signal difficult. Similarly,statistical analyses may be used to characterize the host signal todetermine where to locate the watermark.

Each of the techniques may be used alone, in various combinations, andin combination with other signal processing techniques.

In addition to selecting the appropriate signal processing techniques,the developer is faced with other design considerations. Oneconsideration is the nature and format of the media content. In the caseof digital images, for example, the image data is typically representedas an array of image samples. Color images are represented as an arrayof color vectors in a color space, such as RGB or YUV. The watermark maybe embedded in one or more of the color components of an image. In someimplementations, the embedder may transform the input image into atarget color space, and then proceed with the embedding process in thatcolor space.

2.0 Digital Watermark Embedder and Reader Overview

The following sections describe implementations of a watermark embedderand reader that operate on digital signals. The embedder encodes amessage into a digital signal by modifying its sample values such thatthe message is imperceptible to the ordinary observer in output form. Toextract the message, the reader captures a representation of the signalsuspected of containing a watermark and then processes it to detect thewatermark and decode the message.

FIG. 1 is a block diagram summarizing signal processing operationsinvolved in embedding and reading a watermark. There are three primaryinputs to the embedding process: the original, digitized signal 100, themessage 102, and a series of control parameters 104. The controlparameters may include one or more keys. One key or set of keys may beused to encrypt the message. Another key or set of keys may be used tocontrol the generation of a watermark carrier signal or a mapping ofinformation bits in the message to positions in a watermark informationsignal.

The carrier signal or mapping of the message to the host signal may beencrypted as well. Such encryption may increase security by varying thecarrier or mapping for different components of the watermark orwatermark message. Similarly, if the watermark or watermark message isredundantly encoded throughout the host signal, one or more encryptionkeys can be used to scramble the carrier or signal mapping for eachinstance of the redundantly encoded watermark. This use of encryptionprovides one way to vary the encoding of each instance of theredundantly encoded message in the host signal. Other parameters mayinclude control bits added to the message, and watermark signalattributes (e.g., orientation or other detection patterns) used toassist in the detection of the watermark.

Apart from encrypting or scrambling the carrier and mapping information,the embedder may apply different, and possibly unique carrier or mappingfor different components of a message, for different messages, or fromdifferent watermarks or watermark components to be embedded in the hostsignal. For example, one watermark may be encoded in a block of sampleswith one carrier, while another, possibly different watermark, isencoded in a different block with a different carrier. A similarapproach is to use different mappings in different blocks of the hostsignal.

The watermark embedding process 106 converts the message to a watermarkinformation signal. It then combines this signal with the input signaland possibly another signal (e.g., an orientation pattern) to create awatermarked signal 108. The process of combining the watermark with theinput signal may be a linear or non-linear function. Examples ofwatermarking functions include: S*=S+gX; S*=S(1+gX); and S*=S e^(gX);where S* is the watermarked signal vector, S is the input signal vector,and g is a function controlling watermark intensity. The watermark maybe applied by modulating signal samples S in the spatial, temporal orsome other transform domain.

To encode a message, the watermark encoder analyzes and selectivelyadjusts the host signal to give it attributes that correspond to thedesired message symbol or symbols to be encoded. There are many signalattributes that may encode a message symbol, such as a positive ornegative polarity of signal samples or a set of samples, a given parity(odd or even), a given difference value or polarity of the differencebetween signal samples (e.g., a difference between selected spatialintensity values or transform coefficients), a given distance valuebetween watermarks, a given phase or phase offset between differentwatermark components, a modulation of the phase of the host signal, amodulation of frequency coefficients of the host signal, a givenfrequency pattern, a given quantizer (e.g., in Quantization IndexModulation) etc.

Some processes for combining the watermark with the input signal aretermed non-linear, such as processes that employ dither modulation,modify least significant bits, or apply quantization index modulation.One type of non-linear modulation is where the embedder sets signalvalues so that they have some desired value or characteristiccorresponding to a message symbol. For example, the embedder maydesignate that a portion of the host signal is to encode a given bitvalue. It then evaluates a signal value or set of values in that portionto determine whether they have the attribute corresponding to themessage bit to be encoded. Some examples of attributes include apositive or negative polarity, a value that is odd or even, a checksum,etc. For example, a bit value may be encoded as a one or zero byquantizing the value of a selected sample to be even or odd. As anotherexample, the embedder might compute a checksum or parity of an N bitpixel value or transform coefficient and then set the least significantbit to the value of the checksum or parity. Of course, if the signalalready corresponds to the desired message bit value, it need not bealtered. The same approach can be extended to a set of signal sampleswhere some attribute of the set is adjusted as necessary to encode adesired message symbol. These techniques can be applied to signalsamples in a transform domain (e.g., transform coefficients) or samplesin the temporal or spatial domains.

Quantization index modulation techniques employ a set of quantizers. Inthese techniques, the message to be transmitted is used as an index forquantizer selection. In the decoding process, a distance metric isevaluated for all quantizers and the index with the smallest distanceidentifies the message value.

The watermark detector 110 operates on a digitized signal suspected ofcontaining a watermark. As depicted generally in FIG. 1, the suspectsignal may undergo various transformations 112, such as conversion toand from an analog domain, cropping, copying, editing,compression/decompression, transmission etc. Using parameters 114 fromthe embedder (e.g., orientation pattern, control bits, key(s)), itperforms a series of correlation or other operations on the capturedimage to detect the presence of a watermark. If it finds a watermark, itdetermines its orientation within the suspect signal.

Using the orientation, if necessary, the reader 116 extracts themessage. Some implementations do not perform correlation, but instead,use some other detection process or proceed directly to extract thewatermark signal. For instance in some applications, a reader may beinvoked one or more times at various temporal or spatial locations in anattempt to read the watermark, without a separate pre-processing stageto detect the watermark's orientation.

Some implementations require the original, un-watermarked signal todecode a watermark message, while others do not. In those approacheswhere the original signal is not necessary, the original un-watermarkedsignal can still be used to improve the accuracy of message recovery.For example, the original signal can be removed, leaving a residualsignal from which the watermark message is recovered. If the decoderdoes not have the original signal, it can still attempt to removeportions of it (e.g., by filtering) that are expected not to contain thewatermark signal.

Watermark decoder implementations use known relationships between awatermark signal and a message symbol to extract estimates of messagesymbol values from a signal suspected of containing a watermark. Thedecoder has knowledge of the properties of message symbols and how andwhere they are encoded into the host signal to encode a message. Forexample, it knows how message bit values of one and a zero are encodedand it knows where these message bits are originally encoded. Based onthis information, it can look for the message properties in thewatermarked signal. For example, it can test the watermarked signal tosee if it has attributes of each message symbol (e.g., a one or zero) ata particular location and generate a probability measure as an indicatorof the likelihood that a message symbol has been encoded. Knowing theapproximate location of the watermark in the watermarked signal, thereader implementation may compare known message properties with theproperties of the watermarked signal to estimate message values, even ifthe original signal is unavailable. Distortions to the watermarkedsignal and the host signal itself make the watermark difficult torecover, but accurate recovery of the message can be enhanced using avariety of techniques, such as error correction coding, watermark signalprediction, redundant message encoding, etc.

One way to recover a message value from a watermarked signal is toperform correlation between the known message property of each messagesymbol and the watermarked signal. If the amount of correlation exceedsa threshold, for example, then the watermarked signal may be assumed tocontain the message symbol. The same process can be repeated fordifferent symbols at various locations to extract a message. A symbol(e.g., a binary value of one or zero) or set of symbols may be encodedredundantly to enhance message recovery.

In some cases, it is useful to filter the watermarked signal to removeaspects of the signal that are unlikely to be helpful in recovering themessage and/or are likely to interfere with the watermark message. Forexample, the decoder can filter out portions of the original signal andanother watermark signal or signals. In addition, when the originalsignal is unavailable, the reader can estimate or predict the originalsignal based on properties of the watermarked signal. The original orpredicted version of the original signal can then be used to recover anestimate of the watermark message. One way to use the predicted versionto recover the watermark is to remove the predicted version beforereading the desired watermark. Similarly, the decoder can predict andremove un-wanted watermarks or watermark components before reading thedesired watermark in a signal having two or more watermarks.

2.1 Image Watermark Embedder

FIG. 2 is a block diagram illustrating an implementation of an exemplaryembedder in more detail. The embedding process begins with the message200. As noted above, the message is binary number suitable forconversion to a watermark signal. For additional security, the message,its carrier, and the mapping of the watermark to the host signal may beencrypted with an encryption key 202. In addition to the informationconveyed in the message, the embedder may also add control bit values(“signature bits”) to the message to assist in verifying the accuracy ofa read operation. These control bits, along with the bits representingthe message, are input to an error correction coding process 204designed to increase the likelihood that the message can be recoveredaccurately in the reader.

There are several alternative error correction coding schemes that maybe employed. Some examples include BCH, convolution, Reed Solomon andturbo codes. These forms of error correction coding are sometimes usedin communication applications where data is encoded in a carrier signalthat transfers the encoded data from one place to another. In thedigital watermarking application discussed here, the raw bit data isencoded in a fundamental carrier signal.

In addition to the error correction coding schemes mentioned above, theembedder and reader may also use a Cyclic Redundancy Check (CRC) tofacilitate detection of errors in the decoded message data.

The error correction coding function 204 produces a string of bits,termed raw bits 206, that are embedded into a watermark informationsignal. Using a carrier signal 208 and an assignment map 210, theillustrated embedder encodes the raw bits in a watermark informationsignal 212, 214. In some applications, the embedder may encode adifferent message in different locations of the signal. The carriersignal may be a noise image. For each raw bit, the assignment mapspecifies the corresponding image sample or samples that will bemodified to encode that bit.

The embedder depicted in FIG. 2 operates on blocks of image data(referred to as ‘tiles’) and replicates a watermark in each of theseblocks. As such, the carrier signal and assignment map both correspondto an image block of a pre-determined size, namely, the size of thetile. To encode each bit, the embedder applies the assignment map todetermine the corresponding image samples in the block to be modified toencode that bit. Using the map, it finds the corresponding image samplesin the carrier signal. For each bit, the embedder computes the value ofimage samples in the watermark information signal as a function of theraw bit value and the value(s) of the corresponding samples in thecarrier signal.

To illustrate the embedding process further, it is helpful to consideran example. First, consider the following background. Digitalwatermarking processes are sometimes described in terms of the transformdomain in which the watermark signal is defined. The watermark may bedefined in the spatial or temporal domain, or some other transformdomain such as a wavelet transform, Discrete Cosine Transform (DCT),Discrete Fourier Transform (DFT), Hadamard transform, Hartley transform,Karhunen-Loeve transform (KLT) domain, etc.

Consider an example where the watermark is defined in a transform domain(e.g., a frequency domain such as DCT, wavelet or DFT). The embeddersegments the image in the spatial domain into rectangular tiles andtransforms the image samples in each tile into the transform domain. Forexample in the DCT domain, the embedder segments the image into N by Nblocks and transforms each block into an N by N block of DCTcoefficients. In this example, the assignment map specifies thecorresponding sample location or locations in the frequency domain ofthe tile that correspond to a bit position in the raw bits. In thefrequency domain, the carrier signal looks like a noise pattern. Eachimage sample in the frequency domain of the carrier signal is usedtogether with a selected raw bit value to compute the value of the imagesample at the location in the watermark information signal.

Now consider an example where the watermark is defined in the spatialdomain. The embedder segments the image in the spatial domain intorectangular tiles of image samples (i.e. pixels). In this example, theassignment map specifies the corresponding sample location or locationsin the tile that correspond to each bit position in the raw bits. In thespatial domain, the carrier signal looks like a noise pattern extendingthroughout the tile. Each image sample in the spatial domain of thecarrier signal is used together with a selected raw bit value to computethe value of the image sample at the same location in the watermarkinformation signal.

With this background, the embedder proceeds to encode each raw bit inthe selected transform domain as follows. It uses the assignment map tolook up the position of the corresponding image sample (or samples) inthe carrier signal. The image sample value at that position in thecarrier controls the value of the corresponding position in thewatermark information signal. In particular, the carrier sample valueindicates whether to invert the corresponding watermark sample value.The raw bit value is either a one or zero. Disregarding for a moment theimpact of the carrier signal, the embedder adjusts the correspondingwatermark sample upward to represent a one, or downward to represent azero. Now, if the carrier signal indicates that the corresponding sampleshould be inverted, the embedder adjusts the watermark sample downwardto represent a one, and upward to represent a zero. In this manner, theembedder computes the value of the watermark samples for a raw bit usingthe assignment map to find the spatial location of those samples withinthe block.

From this example, a number of points can be made. First, the embeddermay perform a similar approach in any other transform domain. Second,for each raw bit, the corresponding watermark sample or samples are somefunction of the raw bit value and the carrier signal value. The specificmathematical relationship between the watermark sample, on one hand, andthe raw bit value and carrier signal, on the other, may vary with theimplementation. For example, the message may be convolved with thecarrier, multiplied with the carrier, added to the carrier, or appliedbased on another non-linear function. Third, the carrier signal mayremain constant for a particular application, or it may vary from onemessage to another. For example, a secret key may be used to generatethe carrier signal. For each raw bit, the assignment map may define apattern of watermark samples in the transform domain in which thewatermark is defined. An assignment map that maps a raw bit to a samplelocation or set of locations (i.e. a map to locations in a frequency orspatial domain) is just one special case of an assignment map for atransform domain. Fourth, the assignment map may remain constant, or itmay vary from one message to another. In addition, the carrier signaland map may vary depending on the nature of the underlying image. Insum, there many possible design choices within the implementationframework described above.

The embedder depicted in FIG. 2 combines another watermark component,shown as the detection watermark 216, with the watermark informationsignal to compute the final watermark signal. The detection watermark isspecifically chosen to assist in identifying the watermark and computingits orientation in a detection operation.

FIG. 3 is a spatial frequency plot illustrating one quadrant of adetection watermark. The points in the plot represent impulse functionsindicating signal content of the detection watermark signal. The patternof impulse functions for the illustrated quadrant is replicated in allfour quadrants. There are a number of properties of the detectionpattern that impact its effectiveness for a particular application. Theselection of these properties is highly dependent on the application.One property is the extent to which the pattern is symmetric about oneor more axes. For example, if the detection pattern is symmetrical aboutthe horizontal and vertical axes, it is referred to as being quadsymmetric. If it is further symmetrical about diagonal axes at an angleof 45 degrees, it is referred to as being octally symmetric (repeated ina symmetric pattern 8 times about the origin). Such symmetry aids inidentifying the watermark in an image, and aids in extracting therotation angle. However, in the case of an octally symmetric pattern,the detector includes an additional step of testing which of the fourquadrants the orientation angle falls into.

Another criterion is the position of the impulse functions and thefrequency range that they reside in. Preferably, the impulse functionsfall in a mid frequency range. If they are located in a low frequencyrange, they may be noticeable in the watermarked image. If they arelocated in the high frequency range, they are more difficult to recover.Also, they should be selected so that scaling, rotation, and othermanipulations of the watermarked signal do not push the impulsefunctions outside the range of the detector. Finally, the impulsefunctions should preferably not fall on the vertical or horizontal axes,and each impulse function should have a unique horizontal and verticallocation. While the example depicted in FIG. 3 shows that some of theimpulse functions fall on the same horizontal axis, it is trivial toalter the position of the impulse functions such that each has a uniquevertical or horizontal coordinate.

Returning to FIG. 2, the embedder makes a perceptual analysis 218 of theinput image 220 to identify portions of the image that can withstandmore watermark signal content without substantially impacting imagefidelity. Generally, the perceptual analysis employs a HVS model toidentify signal frequency bands and/or spatial areas to increase ordecrease watermark signal intensity to make the watermark imperceptibleto an ordinary observer. One type of model is to increase watermarkintensity in frequency bands and spatial areas where there is more imageactivity. In these areas, the sample values are changing more than otherareas and have more signal strength. The output of the perceptualanalysis is a perceptual mask 222. The mask may be implemented as anarray of functions, which selectively increase the signal strength ofthe watermark signal based on a HVS model analysis of the input image.The mask may selectively increase or decrease the signal strength of thewatermark signal in areas of greater signal activity.

The embedder combines (224) the watermark information, the detectionsignal and the perceptual mask to yield the watermark signal 226.Finally, it combines (228) the input image 220 and the watermark signal226 to create the watermarked image 230. In the frequency domainwatermark example above, the embedder combines the transform domaincoefficients in the watermark signal to the corresponding coefficientsin the input image to create a frequency domain representation of thewatermarked image. It then transforms the image into the spatial domain.As an alternative, the embedder may be designed to convert the watermarkinto the spatial domain, and then add it to the image.

In the spatial watermark example above, the embedder combines the imagesamples in the watermark signal to the corresponding samples in theinput image to create the watermarked image 230.

The embedder may employ an invertible or non-invertible, and linear ornon-linear function to combine the watermark signal and the input image(e.g., linear functions such as S*=S+gX; or S*=S(1+gX), convolution,quantization index modulation). The net effect is that some imagesamples in the input image are adjusted upward, while others areadjusted downward. The extent of the adjustment is greater in areas orsubbands of the image having greater signal activity.

2.2. Overview of a Detector and Reader

FIG. 4 is a flow diagram illustrating an overview of a watermarkdetection process. This process analyzes image data 400 to search for anorientation pattern of a watermark in an image suspected of containingthe watermark (the target image). First, the detector transforms theimage data to another domain 402, namely the spatial frequency domain,and then performs a series of correlation or other detection operations404. The correlation operations match the orientation pattern with thetarget image data to detect the presence of the watermark and itsorientation parameters 406 (e.g., translation, scale, rotation, anddifferential scale relative to its original orientation). Finally, itre-orients the image data based on one or more of the orientationparameters 408.

If the orientation of the watermark is recovered, the reader extractsthe watermark information signal from the image data (optionally byfirst re-orienting the data based on the orientation parameters). FIG. 5is flow diagram illustrating a process of extracting a message fromre-oriented image data 500. The reader scans the image samples (e.g.,pixels or transform domain coefficients) of the re-oriented image (502),and uses known attributes of the watermark signal to estimate watermarksignal values 504. Recall that in one example implementation describedabove, the embedder adjusted sample values (e.g., frequencycoefficients, color values, etc.) up or down to embed a watermarkinformation signal. The reader uses this attribute of the watermarkinformation signal to estimate its value from the target image. Prior tomaking these estimates, the reader may filter the image to removeportions of the image signal that may interfere with the estimatingprocess. For example, if the watermark signal is expected to reside inlow or medium frequency bands, then high frequencies may be filteredout.

In addition, the reader may predict the value of the originalun-watermarked image to enhance message recovery. One form of predictionuses temporal or spatial neighbors to estimate a sample value in theoriginal image. In the frequency domain, frequency coefficients of theoriginal signal can be predicted from neighboring frequency coefficientsin the same frequency subband. In video applications for example, afrequency coefficient in a frame can be predicted from spatiallyneighboring coefficients within the same frame, or temporallyneighboring coefficients in adjacent frames or fields. In the spatialdomain, intensity values of a pixel can be estimated from intensityvalues of neighboring pixels. Having predicted the value of a signal inthe original, un-watermarked image, the reader then estimates thewatermark signal by calculating an inverse of the watermarking functionused to combine the watermark signal with the original signal.

For such watermark signal estimates, the reader uses the assignment mapto find the corresponding raw bit position and image sample in thecarrier signal (506). The value of the raw bit is a function of thewatermark signal estimate, and the carrier signal at the correspondinglocation in the carrier. To estimate the raw bit value, the readersolves for its value based on the carrier signal and the watermarksignal estimate. As reflected generally in FIG. 5 (508), the result ofthis computation represents only one estimate to be analyzed along withother estimates impacting the value of the corresponding raw bit. Someestimates may indicate that the raw bit is likely to be a one, whileothers may indicate that it is a zero. After the reader completes itsscan, it compiles the estimates for each bit position in the raw bitstring, and makes a determination of the value of each bit at thatposition (510). Finally, it performs the inverse of the error correctioncoding scheme to construct the message (512). In some implementations,probablistic models may be employed to determine the likelihood that aparticular pattern of raw bits is just a random occurrence rather than awatermark.

2.2.1 Example Illustrating Detector Process

FIG. 6 is a diagram depicting an example of a watermark detectionprocess. The detector segments the target image into blocks (e.g., 600,602) and then performs a 2-dimensional fast fourier transform (2D FFT)on several blocks. This process yields 2D transforms of the magnitudesof the image contents of the blocks in the spatial frequency domain asdepicted in the plot 604 shown in FIG. 6.

Next, the detector process performs a log polar remapping of eachtransformed block. The detector may add some of the blocks together toincrease the watermark signal to noise ratio. The type of remapping inthis implementation is referred to as a Fourier Mellin transform. TheFourier Mellin transform is a geometric transform that warps the imagedata from a frequency domain to a log polar coordinate system. Asdepicted in the plot 606 shown in FIG. 6, this transform sweeps throughthe transformed image data along a line at angle θ, mapping the data toa log polar coordinate system shown in the next plot 608. The log polarcoordinate system has a rotation axis, representing the angle θ, and ascale axis. Inspecting the transformed data at this stage, one can seethe orientation pattern of the watermark begin to be distinguishablefrom the noise component (i.e., the image signal).

Next, the detector performs a correlation 610 between the transformedimage block and the transformed orientation pattern 612. At a highlevel, the correlation process slides the orientation pattern over thetransformed image (in a selected transform domain, such as a spatialfrequency domain) and measures the correlation at an array of discretepositions. Each such position has a corresponding scale and rotationparameter associated with it. Ideally, there is a position that clearlyhas the highest correlation relative to all of the others. In practice,there may be several candidates with a promising measure of correlation.As explained further below, these candidates may be subjected to one ormore additional correlation stages to select the one that provides thebest match.

There are a variety of ways to implement the correlation process. Anynumber of generalized matching filters may be implemented for thispurpose. One such filter performs an FFT on the target and theorientation pattern, and multiplies the resulting arrays together toyield a multiplied FFT. Finally, it performs an inverse FFT on themultiplied FFT to return the data into its original log-polar domain.The position or positions within this resulting array with the highestmagnitude represent the candidates with the highest correlation.

When there are several viable candidates, the detector can select a setof the top candidates and apply an additional correlation stage. Eachcandidate has a corresponding rotation and scale parameter. Thecorrelation stage rotates and scales the FFT of the orientation patternand performs a matching operation with the rotated and scaled pattern onthe FFT of the target image. The matching operation multiplies thevalues of the transformed pattern with sample values at correspondingpositions in the target image and accumulates the result to yield ameasure of the correlation. The detector repeats this process for eachof the candidates and picks the one with the highest measure ofcorrelation. As shown in FIG. 6, the rotation and scale parameters (614)of the selected candidate are then used to find additional parametersthat describe the orientation of the watermark in the target image.

The detector applies the scale and rotation to the target data block 616and then performs another correlation process between the orientationpattern 618 and the scaled and rotated data block 616. The correlationprocess 620 is a generalized matching filter operation. It provides ameasure of correlation for an array of positions that each has anassociated translation parameter (e.g., an x, y position). Again, thedetector may repeat the process of identifying promising candidates(i.e. those that reflect better correlation relative to others) andusing those in an additional search for a parameter or set oforientation parameters that provide a better measure of correlation.

At this point, the detector has recovered the following orientationparameters: rotation, scale and translation. For many applications,these parameters may be sufficient to enable accurate reading of thewatermark. In the read operation, the reader applies the orientationparameters to re-orient the target image and then proceeds to extractthe watermark signal.

In some applications, the watermarked image may be stretched more in onespatial dimension than another. This type of distortion is sometimesreferred to as differential scale or shear. Consider that the originalimage blocks are square. As a result of differential scale, each squaremay be warped into a parallelogram with unequal sides. Differentialscale parameters define the nature and extent of this stretching.

There are several alternative ways to recover the differential scaleparameters. One general class of techniques is to use the knownparameters (e.g., the computed scale, rotation, and translation) as astarting point to find the differential scale parameters. Assuming theknown parameters to be valid, this approach warps either the orientationpattern or the target image with selected amounts of differential scaleand picks the differential scale parameters that yield the bestcorrelation.

Another approach to determination of differential scale is set forth inapplication Ser. No. 09/452,022 (filed Nov. 30, 1999, and entitledMethod and System for Determining Image Transformation, attorney docket60057).

2.2.2 Example Illustrating Reader Process

FIG. 7 is a diagram illustrating a re-oriented image 700 superimposedonto the original watermarked image 702. The difference in orientationand scale shows how the image was transformed and edited after theembedding process. The original watermarked image is sub-divided intotiles (e.g., pixel blocks 704, 706, etc.). When superimposed on thecoordinate system of the original image 702 shown in FIG. 7, the targetimage blocks typically do not match the orientation of the originalblocks.

The reader scans samples of the re-oriented image data, estimating thewatermark information signal. It estimates the watermark informationsignal, in part, by predicting original sample values of theun-watermarked image. The reader then uses an inverted form of thewatermarking function to estimate the watermark information signal fromthe watermarked signal and the predicted signal. This invertedwatermarking function expresses the estimate of the watermark signal asa function of the predicted signal and the watermarked signal. Having anestimate of the watermark signal, it then uses the known relationshipamong the carrier signal, the watermark signal, and the raw bit tocompute an estimate of the raw bit. Recall that samples in the watermarkinformation signal are a function of the carrier signal and the raw bitvalue. Thus, the reader may invert this function to solve for anestimate of the raw bit value.

Recall that the embedder implementation discussed in connection withFIG. 2 redundantly encodes the watermark information signal in blocks ofthe input signal. Each raw bit may map to several samples within ablock. In addition, the embedder repeats a mapping process for each ofthe blocks. As such, the reader generates several estimates of the rawbit value as it scans the watermarked image.

The information encoded in the raw bit string can be used to increasethe accuracy of read operations. For instance, some of the raw bits actas signature bits that perform a validity checking function. Unlikeunknown message bits, the reader knows the expected values of thesesignature bits. The reader can assess the validity of a read operationbased on the extent to which the extracted signature bit values matchthe expected signature bit values. The estimates for a given raw bitvalue can then be given a higher weight depending on whether they arederived from a tile with a greater measure of validity.

3.0 Embedder Implementation:

The following sections describe an implementation of the digital imagewatermark embedder depicted in FIG. 8. The embedder inserts twowatermark components into the host image: a message component and adetection component (called the orientation pattern). The messagecomponent is defined in a spatial domain or other transform domain,while the orientation pattern is defined in a frequency domain. Asexplained later, the message component serves a dual function ofconveying a message and helping to identify the watermark location inthe image.

The embedder inserts the watermark message and orientation pattern inblocks of a selected color plane or planes (e.g., luminance orchrominance plane) of the host image. The message payload varies fromone application to another, and can range from a single bit to thenumber of image samples in the domain in which it is embedded. Theblocks may be blocks of samples in a spatial domain or some othertransform domain.

3.1 Encoding the Message

The embedder converts binary message bits into a series of binary rawbits that it hides in the host image. As part of this process, a messageencoder 800 appends certain known bits to the message bits 802. Itperforms an error detection process (e.g., parity, Cyclic RedundancyCheck (CRC), etc.) to generate error detection bits and adds the errordetection bits to the message. An error correction coding operation thengenerates raw bits from the combined known and message bit string.

For the error correction operation, the embedder may employ any of avariety of error correction codes such as Reed Solomon, BCH, convolutionor turbo codes. The encoder may perform an M-ary modulation process onthe message bits that maps groups of message bits to a message signalbased on an M-ary symbol alphabet.

In one application of the embedder, the component of the messagerepresenting the known bits is encoded more redundantly than the othermessage bits. This is an example of a shorter message component havinggreater signal strength than a longer, weaker message component. Theembedder gives priority to the known bits in this scheme because thereader uses them to verify that it has found the watermark in apotentially corrupted image, rather than a signal masquerading as thewatermark.

3.2 Spread Spectrum Modulation

The embedder uses spread spectrum modulation as part of the process ofcreating a watermark signal from the raw bits. A spread spectrummodulator 804 spreads each raw bit into a number of “chips.” Theembedder generates a pseudo random number that acts as the carriersignal of the message. To spread each raw bit, the modulator performs anexclusive OR (XOR) operation between the raw bit and each bit of apseudo random binary number of a pre-determined length. The length ofthe pseudo random number depends, in part, on the size of the messageand the image. Preferably, the pseudo random number should containroughly the same number of zeros and ones, so that the net effect of theraw bit on the host image block is zero. If a bit value in the pseudorandom number is a one, the value of the raw bit is inverted.Conversely, if the bit value is a zero, then the value of the raw bitremains the same.

The length of the pseudorandom number may vary from one message bit orsymbol to another. By varying the length of the number, some messagebits can be spread more than others.

3.3 Scattering the Watermark Message

The embedder scatters each of the chips corresponding to a raw bitthroughout an image block. An assignment map 806 assigns locations inthe block to the chips of each raw bit. Each raw bit is spread overseveral chips. As noted above, an image block may represent a block oftransform domain coefficients or samples in a spatial domain. Theassignment map may be used to encode some message bits or symbols (e.g.,groups of bits) more redundantly than others by mapping selected bits tomore locations in the host signal than other message bits. In addition,it may be used to map different messages, or different components of thesame message, to different locations in the host signal.

FIG. 9 depicts an example of the assignment map. Each of the blocks inFIG. 9 correspond to an image block and depict a pattern of chipscorresponding to a single raw bit. FIG. 9 depicts a total of 32 exampleblocks. The pattern within a block is represented as black dots on awhite background. Each of the patterns is mutually exclusive such thateach raw bit maps to a pattern of unique locations relative to thepatterns of every other raw bit. Though not a requirement, the combinedpatterns, when overlapped, cover every location within the image block.

3.4 Gain Control and Perceptual Analysis

To insert the information carried in a chip to the host image, theembedder alters the corresponding sample value in the host image. Inparticular, for a chip having a value of one, it adds to thecorresponding sample value, and for a chip having a value of zero, itsubtracts from the corresponding sample value. A gain controller in theembedder adjusts the extent to which each chip adds or subtracts fromthe corresponding sample value.

The gain controller takes into account the orientation pattern whendetermining the gain. It applies a different gain to the orientationpattern than to the message component of the watermark. After applyingthe gain, the embedder combines the orientation pattern and messagecomponents together to form the composite watermark signal, and combinesthe composite watermark with the image block. One way to combine thesesignal components is to add them, but other linear or non-linearfunctions may be used as well.

The orientation pattern is comprised of a pattern of quad symmetricimpulse functions in the spatial frequency domain. In the spatialdomain, these impulse functions look like cosine waves. An example ofthe orientation pattern is depicted in FIGS. 10 and 11. FIG. 10 showsthe impulse functions as points in the spatial frequency domain, whileFIG. 11 shows the orientation pattern in the spatial domain. Beforeadding the orientation pattern component to the message component, theembedder may transform the watermark components to a common domain. Forexample, if the message component is in a spatial domain and theorientation component is in a frequency domain, the embedder transformsthe orientation component to a common spatial domain before combiningthem together.

FIG. 8 depicts the gain controller used in the embedder. Note that thegain controller operates on the blocks of image samples 808, the messagewatermark signal, and a global gain input 810, which may be specified bythe user. A perceptual analyzer component 812 of the gain controllerperforms a perceptual analysis on the block to identify samples that cantolerate a stronger watermark signal without substantially impactingvisibility. In places where the naked eye is less likely to notice thewatermark, the perceptual analyzer increases the strength of thewatermark. Conversely, it decreases the watermark strength where the eyeis more likely to notice the watermark.

The perceptual analyzer shown in FIG. 8 performs a series of filteringoperations on the image block to compute an array of gain values. Thereare a variety of filters suitable for this task. These filters includean edge detector filter that identifies edges of objects in the image, anon-linear filter to map gain values into a desired range, and averagingor median filters to smooth the gain values. Each of these filters maybe implemented as a series of one-dimensional filters (one operating onrows and the other on columns) or two-dimensional filters. The size ofthe filters (i.e. the number of samples processed to compute a value fora given location) may vary (e.g., 3 by 3, 5 by 5, etc.). The shape ofthe filters may vary as well (e.g., square, cross-shaped, etc.). Theperceptual analyzer process produces a detailed gain multiplier. Themultiplier is a vector with elements corresponding to samples in ablock.

Another component 818 of the gain controller computes an asymmetric gainbased on the output of the image sample values and message watermarksignal. This component analyzes the samples of the block to determinewhether they are consistent with the message signal. The embedderreduces the gain for samples whose values relative to neighboring valuesare consistent with the message signal.

The embedder applies the asymmetric gain to increase the chances of anaccurate read in the watermark reader. To understand the effect of theasymmetric gain, it is helpful to explain the operation of the reader.The reader extracts the watermark message signal from the watermarkedsignal using a predicted version of the original signal. It estimatesthe watermark message signal value based on values of the predictedsignal and the watermarked signal at locations of the watermarked signalsuspected of containing a watermark signal. There are several ways topredict the original signal. One way is to compute a local average ofsamples around the sample of interest. The average may be computed bytaking the average of vertically adjacent samples, horizontally adjacentsamples, an average of samples in a cross-shaped filter (both verticaland horizontal neighbors, an average of samples in a square-shapedfilter, etc. The estimate may be computed one time based on a singlepredicted value from one of these averaging computations. Alternatively,several estimates may be computed based on two or more of theseaveraging computations (e.g., one estimate for vertically adjacentsamples and another for horizontally adjacent samples). In the lattercase, the reader may keep estimates if they satisfy a similarity metric.In other words, the estimates are deemed valid if they within apredetermined value or have the same polarity.

Knowing this behavior of the reader, the embedder computes theasymmetric gain as follows. For samples that have values relative totheir neighbors that are consistent with the watermark signal, theembedder reduces the asymmetric gain. Conversely, for samples that areinconsistent with the watermark signal, the embedder increases theasymmetric gain. For example, if the chip value is a one, then thesample is consistent with the watermark signal if its value is greaterthan its neighbors. Alternatively, if the chip value is a zero, then thesample is consistent with the watermark signal if its value is less thanits neighbors.

Another component 820 of the gain controller computes a differentialgain, which represents an adjustment in the message vs. orientationpattern gains. As the global gain increases, the embedder emphasizes themessage gain over the orientation pattern gain by adjusting the globalgain by an adjustment factor. The inputs to this process 820 include theglobal gain 810 and a message differential gain 822. When the globalgain is below a lower threshold, the adjustment factor is one. When theglobal gain is above an upper threshold, the adjustment factor is set toan upper limit greater than one. For global gains falling within the twothresholds, the adjustment factor increases linearly between one and theupper limit. The message differential gain is the product of theadjustment factor and the global gain.

At this point, there are four sources of gain: the detailed gain, theglobal gain, the asymmetric gain, and the message dependent gain. Theembedder applies the first two gain quantities to both the message andorientation watermark signals. It only applies the latter two to themessage watermark signal. FIG. 8 depicts how the embedder applies thegain to the two watermark components. First, it multiplies the detailedgain with the global gain to compute the orientation pattern gain. Itthen multiplies the orientation pattern gain with the adjusted messagedifferential gain and asymmetric gain to form the composite messagegain.

Finally, the embedder forms the composite watermark signal. Itmultiplies the composite message gain with the message signal, andmultiplies the orientation pattern gain with the orientation patternsignal. It then combines the result in a common transform domain to getthe composite watermark. The embedder applies a watermarking function tocombine the composite watermark to the block to create a watermarkedimage block. The message and orientation components of the watermark maybe combined by mapping the message bits to samples of the orientationsignal, and modulating the samples of the orientation signal to encodethe message.

The embedder computes the watermark message signal by converting theoutput of the assignment map 806 to delta values, indicating the extentto which the watermark signal changes the host signal. As noted above, achip value of one corresponds to an upward adjustment of thecorresponding sample, while a chip value of zero corresponds to adownward adjustment. The embedder specifies the specific amount ofadjustment by assigning a delta value to each of the watermark messagesamples (830).

4.0 Detector Implementation

FIG. 12 illustrates an overview of a watermark detector that detects thepresence of a detection watermark in a host image and its orientation.Using the orientation pattern and the known bits inserted in thewatermark message, the detector determines whether a potentiallycorrupted image contains a watermark, and if so, its orientation in theimage.

Recall that the composite watermark is replicated in blocks of theoriginal image. After an embedder places the watermark in the originaldigital image, the watermarked image is likely to undergo severaltransformations, either from routine processing or from intentionaltampering. Some of these transformations include: compression,decompression, color space conversion, digital to analog conversion,printing, scanning, analog to digital conversion, scaling, rotation,inversion, flipping differential scale, and lens distortion. In additionto these transformations, various noise sources can corrupt thewatermark signal, such as fixed pattern noise, thermal noise, etc.

When building a detector implementation for a particular application,the developer may implement counter-measures to mitigate the impact ofthe types of transformations, distortions and noise expected for thatapplication. Some applications may require more counter-measures thanothers. The detector described below is designed to recover a watermarkfrom a watermarked image after the image has been printed, and scanned.The following sections describe the counter-measures to mitigate theimpact of various forms of corruption. The developer can select fromamong these counter-measures when implementing a detector for aparticular application.

For some applications, the detector will operate in a system thatprovides multiple image frames of a watermarked object. One typicalexample of such a system is a computer equipped with a digital camera.In such a configuration, the digital camera can capture a temporalsequence of images as the user or some device presents the watermarkedimage to the camera.

As shown in FIG. 12, the principal components of the detector are: 1)pre-processor 900; 2) rotation and scale estimator 902; 3) orientationparameter refiner 904; 4) translation estimator 906; 5) translationrefiner 908; and reader 910.

The preprocessor 900 takes one or more frames of image data 912 andproduces a set of image blocks 914 prepared for further analysis. Therotation-scale estimator 902 computes rotation-scale vectors 916 thatestimate the orientation of the orientation signal in the image blocks.The parameter refiner 904 collects additional evidence of theorientation signal and further refines the rotation scale vectorcandidates by estimating differential scale parameters. The result ofthis refining stage is a set of 4D vectors candidates 918 (rotation,scale, and two differential scale parameters). The translation estimator906 uses the 4D vector candidates to re-orient image blocks withpromising evidence of the orientation signal. It then finds estimates oftranslation parameters 920. The translation refiner 908 invokes thereader 910 to assess the merits of an orientation vector. When invokedby the detector, the reader uses the orientation vector to approximatethe original orientation of the host image and then extracts values forthe known bits in the watermark message. The detector uses thisinformation to assess the merits of and refine orientation vectorcandidates.

By comparing the extracted values of the known bits with the expectedvalues, the reader provides a figure of merit for an orientation vectorcandidate. The translation refiner then picks a 6D vector, includingrotation, scale, differential scale and translation, that appears likelyproduce a valid read of the watermark message 922. The followingsections describe implementations of these components in more detail.

4.1 Detector Pre-Processing

FIG. 13 is a flow diagram illustrating preprocessing operations in thedetector shown in FIG. 12. The detector performs a series ofpre-processing operations on the native image 930 to prepare the imagedata for further analysis. It begins by filling memory with one or moreframes of native image data (932), and selecting sets of pixel blocks934 from the native image data for further analysis (936). While thedetector can detect a watermark using a single image frame, it also hassupport for detecting the watermark using additional image frames. Asexplained below, the use of multiple frames has the potential forincreasing the chances of an accurate detection and read.

In applications where a camera captures an input image of a watermarkedobject, the detector may be optimized to address problems resulting frommovement of the object. Typical PC cameras, for example, are capable ofcapturing images at a rate of at least 10 frames a second. A frustrateduser might attempt to move the object in an attempt to improvedetection. Rather than improving the chances of detection, the movementof the object changes the orientation of the watermark from one frame tothe next, potentially making the watermark more difficult to detect. Oneway to address this problem is to buffer one or more frames, and thenscreen the frame or frames to determine if they are likely to contain avalid watermark signal. If such screening indicates that a frame is notlikely to contain a valid signal, the detector can discard it andproceed to the next frame in the buffer, or buffer a new frame. Anotherenhancement is to isolate portions of a frame that are most likely tohave a valid watermark signal, and then perform more detailed detectionof the isolated portions.

After loading the image into the memory, the detector selects imageblocks 934 for further analysis. It is not necessary to load or examineeach block in a frame because it is possible to extract the watermarkusing only a portion of an image. The detector looks at only a subset ofthe samples in an image, and preferably analyzes samples that are morelikely to have a recoverable watermark signal.

The detector identifies portions of the image that are likely to havethe highest watermark signal to noise ratio. It then attempts to detectthe watermark signal in the identified portions. In the context ofwatermark detection, the host image is considered to be a source ofnoise along with conventional noise sources. While it is typically notpractical to compute the signal to noise ratio, the detector canevaluate attributes of the signal that are likely to evince a promisingwatermark signal to noise ratio. These properties include the signalactivity (as measured by sample variance, for example), and a measure ofthe edges (abrupt changes in image sample values) in an image block.Preferably, the signal activity of a candidate block should fall withinan acceptable range, and the block should not have a high concentrationof strong edges. One way to quantify the edges in the block is to use anedge detection filter (e.g., a LaPlacian, Sobel, etc.).

In one implementation, the detector divides the input image into blocks,and analyzes each block based on pre-determined metrics. It then ranksthe blocks according to these metrics. The detector then operates on theblocks in the order of the ranking. The metrics include sample variancein a candidate block and a measure of the edges in the block. Thedetector combines these metrics for each candidate block to compute arank representing the probability that it contains a recoverablewatermark signal.

In another implementation, the detector selects a pattern of blocks andevaluates each one to try to make the most accurate read from theavailable data. In either implementation, the block pattern and size mayvary. This particular implementation selects a pattern of overlappingblocks (e.g., a row of horizontally aligned, overlapping blocks). Oneoptimization of this approach is to adaptively select a block patternthat increases the signal to noise ratio of the watermark signal. Whileshown as one of the initial operations in the preparation, the selectionof blocks can be postponed until later in the pre-processing stage.

Next, the detector performs a color space conversion on native imagedata to compute an array of image samples in a selected color space foreach block (936). In the following description, the color space isluminance, but the watermark may be encoded in one or more differentcolor spaces. The objective is to get a block of image samples withlowest noise practical for the application. While the implementationcurrently performs a row by row conversion of the native image data into8 bit integer luminance values, it may be preferable to convert tofloating-point values for some applications. One optimization is toselect a luminance converter that is adapted for the sensor used tocapture the digital input image. For example, one might experimentallyderive the lowest noise luminance conversion for commercially availablesensors, e.g., CCD cameras or scanners, CMOS cameras, etc. Then, thedetector could be programmed to select either a default luminanceconverter, or one tuned to a specific type of sensor.

At one or more stages of the detector, it may be useful to performoperations to mitigate the impact of noise and distortion. In thepre-processing phase, for example, it may be useful to evaluate fixedpattern noise and mitigate its effect (938). The detector may look forfixed pattern noise in the native input data or the luminance data, andthen mitigate it.

One way to mitigate certain types of noise is to combine data fromdifferent blocks in the same frame, or corresponding blocks in differentframes 940. This process helps augment the watermark signal present inthe blocks, while reducing the noise common to the blocks. For example,merely adding blocks together may mitigate the effects of common noise.

In addition to common noise, other forms of noise may appear in each ofthe blocks such as noise introduced in the printing or scanningprocesses. Depending on the nature of the application, it may beadvantageous to perform common noise recognition and removal at thisstage 942. The developer may select a filter or series of filters totarget certain types of noise that appear during experimentation withimages. Certain types of median filters may be effective in mitigatingthe impact of spectral peaks (e.g., speckles) introduced in printing orscanning operations.

In addition to introducing noise, the printing and image captureprocesses may transform the color or orientation of the original,watermarked image. As described above, the embedder typically operateson a digital image in a particular color space and at a desiredresolution. The watermark embedders normally operate on digital imagesrepresented in an RGB or CYMK color space at a desired resolution (e.g.,100 dpi or 300 dpi, the resolution at which the image is printed). Theimages are then printed on paper with a screen printing process thatuses the CYMK subtractive color space at a line per inch (LPI) rangingfrom 65-200. 133 lines/in is typical for quality magazines and 73lines/in is typical for newspapers. In order to produce a quality imageand avoid pixelization, the rule of thumb is to use digital images witha resolution that is at least twice the press resolution. This is due tothe half tone printing for color production. Also, different presses usescreens with different patterns and line orientations and have differentprecision for color registration.

One way to counteract the transforms introduced through the printingprocess is to develop a model that characterizes these transforms andoptimize watermark embedding and detecting based on thischaracterization. Such a model may be developed by passing watermarkedand unwatermarked images through the printing process and observing thechanges that occur to these images. The resulting model characterizesthe changes introduced due to the printing process. The model mayrepresent a transfer function that approximates the transforms due tothe printing process. The detector then implements a pre-processingstage that reverses or at least mitigates the effect of the printingprocess on watermarked images. The detector may implement apre-processing stage that performs the inverse of the transfer functionfor the printing process.

A related challenge is the variety in paper attributes used in differentprinting processes. Papers of various qualities, thickness andstiffness, absorb ink in various ways. Some papers absorb ink evenly,while others absorb ink at rates that vary with the changes in thepaper's texture and thickness. These variations may degrade the embeddedwatermark signal when a digitally watermarked image is printed. Thewatermark process can counteract these effects by classifying andcharacterizing paper so that the embedder and reader can compensate forthis printing-related degradation.

Variations in image capture processes also pose a challenge. In someapplications, it is necessary to address problems introduced due tointerlaced image data. Some video camera produce interlaced fieldsrepresenting the odd or even scan lines of a frame. Problems arise whenthe interlaced image data consists of fields from two consecutiveframes. To construct an entire frame, the preprocessor may combine thefields from consecutive frames while dealing with the distortion due tomotion that occurs from one frame to the next. For example, it may benecessary to shift one field before interleaving it with another fieldto counteract inter-frame motion. A de-blurring function may be used tomitigate the blurring effect due to the motion between frames.

Another problem associated with cameras in some applications is blurringdue to the lack of focus. The preprocessor can mitigate this effect byestimating parameters of a blurring function and applying a de-blurringfunction to the input image.

Yet another problem associated with cameras is that they tend to havecolor sensors that utilize different color pattern implementations. Assuch, a sensor may produce colors slightly different than thoserepresented in the object being captured. Most CCD and CMOS cameras usean array of sensors to produce colored images. The sensors in the arrayare arranged in clusters of sensitive to three primary colors red,green, and blue according to a specific pattern. Sensors designated fora particular color are dyed with that color to increase theirsensitivity to the designated color. Many camera manufacturers use aBayer color pattern GR/BG. While this pattern produces good imagequality, it causes color mis-registration that degrades the watermarksignal. Moreover, the color space converter, which maps the signal fromthe sensors to another color space such as YUV or RGB, may vary from onemanufacturer to another. One way to counteract the mis-registration ofthe camera's color pattern is to account for the distortion due to thepattern in a color transformation process, implemented either within thecamera itself, or as a pre-processing function in the detector.

Another challenge in counteracting the effects of the image captureprocess is dealing with the different types of distortion introducedfrom various image capture devices. For example, cameras have differentsensitivities to light. In addition, their lenses have differentspherical distortion, and noise characteristics. Some scanners have poorcolor reproduction or introduce distortion in the image aspect ratio.Some scanners introduce aliasing and employ interpolation to increaseresolution. The detector can counteract these effects in thepre-processor by using an appropriate inverse transfer function. Anoff-line process first characterizes the distortion of several differentimage capture devices (e.g., by passing test images through the scannerand deriving a transfer function modeling the scanner distortion). Somedetectors may be equipped with a library of such inverse transferfunctions from which they select one that corresponds to the particularimage capture device

Yet another challenge in applications where the image is printed onpaper and later scanned is that the paper deteriorates over time anddegrades the watermark. Also, varying lighting conditions make thewatermark difficult to detect. Thus, the watermark may be selected so asto be more impervious to expected deterioration, and recoverable over awider range of lighting conditions.

At the close of the pre-processing stage, the detector has selected aset of blocks for further processing. It then proceeds to gatherevidence of the orientation signal in these blocks, and estimate theorientation parameters of promising orientation signal candidates. Sincethe image may have suffered various forms of corruption, the detectormay identify several parts of the image that appear to have attributessimilar to the orientation signal. As such, the detector may have toresolve potentially conflicting and ambiguous evidence of theorientation signal. To address this challenge, the detector estimatesorientation parameters, and then refines theses estimates to extract theorientation parameters that are more likely to evince a valid signalthan other parameter candidates.

4.2 Estimating Initial Orientation Parameters

FIG. 14 is a flow diagram illustrating a process for estimatingrotation-scale vectors. The detector loops over each image block (950),calculating rotation-scale vectors with the best detection values ineach block. First, the detector filters the block in a manner that tendsto amplify the orientation signal while suppressing noise, includingnoise from the host image itself (952). Implemented as a multi-axisLaPlacian filter, the filter highlights edges (e.g., high frequencycomponents of the image) and then suppresses them. The term,“multi-axis,” means that the filter includes a series of stages thateach operates on particular axis. First, the filter operates on the rowsof luminance samples, then operates on the columns, and adds theresults. The filter may be applied along other axes as well. Each passof the filter produces values at discrete levels. The final result is anarray of samples, each having one of five values: {−2, −1, 0, 1, 2}.

Next, the detector performs a windowing operation on the block data toprepare it for an FFT transform (954). This windowing operation providessignal continuity at the block edges. The detector then performs an FFT(956) on the block, and retains only the magnitude component (958).

In an alternative implementation, the detector may use the phase signalproduced by the FFT to estimate the translation parameter of theorientation signal. For example, the detector could use the rotation andscale parameters extracted in the process described below, and thencompute the phase that provided the highest measure of correlation withthe orientation signal using the phase component of the FFT process.

After computing the FFT, the detector applies a Fourier magnitude filter(960) on the magnitude components. The filter in the implementationslides over each sample in the Fourier magnitude array and filters thesample's eight neighbors in a square neighborhood centered at thesample. The filter boosts values representing a sharp peak with a rapidfall-off, and suppresses the fall-off portion. It also performs athreshold operation to clip peaks to an upper threshold.

Next, the detector performs a log-polar re-sample (962) of the filteredFourier magnitude array to produce a log-polar array 964. This type ofoperation is sometimes referred to as a Fourier Mellin transform. Thedetector, or some off-line pre-processor, performs a similar operationon the orientation signal to map it to the log-polar coordinate system.Using matching filters, the detector implementation searches for aorientation signal in a specified window of the log-polar coordinatesystem. For example, consider that the log-polar coordinate system is atwo dimensional space with the scale being the vertical axis and theangle being the horizontal axis. The window ranges from 0 to 90 degreeson the horizontal axis and from approximately 50 to 2400 dpi on thevertical axis. Note that the orientation pattern should be selected sothat routine scaling does not push the orientation pattern out of thiswindow. The orientation pattern can be designed to mitigate thisproblem, as noted above, and as explained in co-pending patentapplication No. 60/136,572, filed May 28, 1999, by Ammon Gustafson,entitled Watermarking System With Improved Technique for DetectingScaling and Rotation, filed May 28, 1999.

The detector proceeds to correlate the orientation and the target signalin the log polar coordinate system. As shown in FIG. 14, the detectoruses a generalized matched filter GMF (966). The GMF performs an FFT onthe orientation and target signal, multiplies the resulting Fourierdomain entities, and performs an inverse FFT. This process yields arectangular array of values in log-polar coordinates, each representinga measure of correlation and having a corresponding rotation angle andscale vector. As an optimization, the detector may also perform the samecorrelation operations for distorted versions (968, 970, 972) of theorientation signal to see if any of the distorted orientation patternsresults in a higher measure of correlation. For example, the detectormay repeat the correlation operation with some pre-determined amount ofhorizontal and vertical differential distortion (970, 972). The resultof this correlation process is an array of correlation values 974specifying the amount of correlation that each correspondingrotation-scale vector provides.

The detector processes this array to find the top M peaks and theirlocation in the log-polar space 976. To extract the location moreaccurately, the detector uses interpolation to provide the inter-samplelocation of each of the top peaks 978. The interpolator computes the 2Dmedian of the samples around a peak and provides the location of thepeak center to an accuracy of 0.1 sample.

The detector proceeds to rank the top rotation-scale vectors based onyet another correlation process 980. In particular, the detectorperforms a correlation between a Fourier magnitude representation foreach rotation-scale vector candidate and a Fourier magnitudespecification of the orientation signal 982. Each Fourier magnituderepresentation is scaled and rotated by an amount reflected by thecorresponding rotation-scale vector. This correlation operation sums apoint-wise multiplication of the orientation pattern impulse functionsin the frequency domain with the Fourier magnitude values of the imageat corresponding frequencies to compute a measure of correlation foreach peak 984. The detector then sorts correlation values for the peaks(986).

Finally, the detector computes a detection value for each peak (988). Itcomputes the detection value by quantizing the correlation values.Specifically, it computes a ratio of the peak's correlation value andthe correlation value of the next largest peak. Alternatively, thedetector may compute the ratio of the peak's correlation value and a sumor average of the correlation values of the next n highest peaks, wheren is some predetermined number. Then, the detector maps this ratio to adetection value based on a statistical analysis of unmarked images.

The statistical analysis plots a distribution of peak ratio values foundin unmarked images. The ratio values are mapped to a detection valuebased on the probability that the value came from an unmarked image. Forexample, 90% of the ratio values in unmarked images fall below a firstthreshold T1, and thus, the detection value mapping for a ratio of T1 isset to 1. Similarly, 99% of the ratio values in unmarked images fallbelow T2, and therefore, the detection value is set to 2. 99.9% of theratio values in unmarked images fall below T3, and the correspondingdetection value is set to 3. The threshold values, T1, T2 and T3, may bedetermined by performing a statistical analysis of several images. Themapping of ratios to detection values based on the statisticaldistribution may be implemented in a look up table.

The statistical analysis may also include a maximum likelihood analysis.In such an analysis, an off-line detector generates detection valuestatistics for both marked and unmarked images. Based on the probabilitydistributions of marked and unmarked images, it determines thelikelihood that a given detection value for an input image originatesfrom a marked and unmarked image.

At the end of these correlation stages, the detector has computed aranked set of rotation-scale vectors 990, each with a quantized measureof correlation associated with it. At this point, the detector couldsimply choose the rotation and scale vectors with the highest rank andproceed to compute other orientation parameters, such as differentialscale and translation. Instead, the detector gathers more evidence torefine the rotation-scale vector estimates. FIG. 15 is a flow diagramillustrating a process for refining the orientation parameters usingevidence of the orientation signal collected from blocks in the currentframe.

Continuing in the current frame, the detector proceeds to compare therotation and scale parameters from different blocks (e.g., block 0,block 1, block 2; 1000, 1002, and 1004 in FIG. 15). In a processreferred to as interblock coincidence matching 1006, it looks forsimilarities between rotation-scale parameters that yielded the highestcorrelation in different blocks. To quantify this similarity, itcomputes the geometric distance between each peak in one block withevery other peak in the other blocks. It then computes the probabilitythat peaks will fall within this calculated distance. There are avariety of ways to calculate the probability. In one implementation, thedetector computes the geometric distance between two peaks, computes thecircular area encompassing the two peaks (π(geometric distance)²), andcomputes the ratio of this area to the total area of the block. Finally,it quantizes this probability measure for each pair of peaks (1008) bycomputing the log (base 10) of the ratio of the total area over the areaencompassing the two peaks. At this point, the detector has calculatedtwo detection values: quantized peak value, and the quantized distancemetric.

The detector now forms multi-block grouping of rotation-scale vectorsand computes a combined detection value for each grouping (1010). Thedetector groups vectors based on their relative geometric proximitywithin their respective blocks. It then computes the combined detectionvalue by combining the detection values of the vectors in the group(1012). One way to compute a combined detection value is to add thedetection values or add a weighted combination of them.

Having calculated the combined detection values, the detector sorts eachgrouping by its combined detection value (1014). This process produces aset of the top groupings of unrefined rotation-scale candidates, rankedby detection value 1016. Next, the detector weeds out rotation-scalevectors that are not promising by excluding those groupings whosecombined detection values are below a threshold (the “refine threshold”1018). The detector then refines each individual rotation-scale vectorcandidate within the remaining groupings.

The detector refines a rotation-scale vector by adjusting the vector andchecking to see whether the adjustment results in a better correlation.As noted above, the detector may simply pick the best rotation-scalevector based on the evidence collected thus far, and refine only thatvector. An alternative approach is to refine each of the toprotation-scale vector candidates, and continue to gather evidence foreach candidate. In this approach, the detector loops over each vectorcandidate (1020), refining each one.

One approach of refining the orientation vector is as follows:

-   -   fix the orientation signal impulse functions (“points”) within a        valid boundary (1022);    -   pre-refine the rotation-scale vector (1024);    -   find the major axis and re-fix the orientation points (1026);        and    -   refine each vector with the addition of a differential scale        component (1028).

In this approach, the detector pre-refines a rotation-scale vector byincrementally adjusting one of the parameters (scale, rotation angle),adjusting the orientation points, and then summing a point-wisemultiplication of the orientation pattern and the image block in theFourier magnitude domain. The refiner compares the resulting measure ofcorrelation with previous measures and continues to adjust one of theparameters so long as the correlation increases. After refining thescale and rotation angle parameters, the refiner finds the major axis,and re-fixes the orientation points. It then repeats the refiningprocess with the introduction of differential scale parameters. At theend of this process, the refiner has converted each scale-rotationcandidate to a refined 4D vector, including rotation, scale, and twodifferential scale parameters.

At this stage, the detector can pick a 4D vector or set of 4D vector andproceed to calculate the final remaining parameter, translation.Alternatively, the detector can collect additional evidence about themerits of each 4D vector.

One way to collect additional evidence about each 4D vector is tore-compute the detection value of each orientation vector candidate(1030). For example, the detector may quantize the correlation valueassociated with each 4D vector as described above for the rotation-scalevector peaks (see item 988, FIG. 14 and accompanying text). Another wayto collect additional evidence is to repeat the coincidence matchingprocess for the 4D vectors. For this coincidence matching process, thedetector computes spatial domain vectors for each candidate (1032),determines the distance metric between candidates from different blocks,and then groups candidates from different blocks based on the distancemetrics (1034). The detector then re-sorts the groups according to theircombined detection values (1036) to produce a set of the top P groupings1038 for the frame.

FIG. 16 is a flow diagram illustrating a method for aggregating evidenceof the orientation signal from multiple frames. In applications withmultiple frames, the detector collects the same information fororientation vectors of the selected blocks in each frame (namely, thetop P groupings of orientation vector candidates, e.g., 1050, 1052 and1054). The detector then repeats coincidence matching betweenorientation vectors of different frames (1056). In particular, in thisinter-frame mode, the detector quantizes the distance metrics computedbetween orientation vectors from blocks in different frames (1058). Itthen finds inter-frame groupings of orientation vectors (super-groups)using the same approach described above (1060), except that theorientation vectors are derived from blocks in different frames. Afterorganizing orientation vectors into super-groups, the detector computesa combined detection value for each super-group (1062) and sorts thesuper-groups by this detection value (1064). The detector then evaluateswhether to proceed to the next stage (1066), or repeat the above processof computing orientation vector candidates from another frame (1068).

If the detection values of one or more super-groups exceed a threshold,then the detector proceeds to the next stage. If not, the detectorgathers evidence of the orientation signal from another frame andreturns to the inter-frame coincidence matching process. Ultimately,when the detector finds sufficient evidence to proceed to the nextstage, it selects the super-group with the highest combined detectionvalue (1070), and sorts the blocks based on their correspondingdetection values (1072) to produce a ranked set of blocks for the nextstage (1074).

4.3 Estimating Translation Parameters

FIG. 17 is a flow diagram illustrating a method for estimatingtranslation parameters of the orientation signal, using informationgathered from the previous stages.

In this stage, the detector estimates translation parameters. Theseparameters indicate the starting point of a watermarked block in thespatial domain. The translation parameters, along with rotation, scaleand differential scale, form a complete 6D orientation vector. The 6Dvector enables the reader to extract luminance sample data inapproximately the same orientation as in the original watermarked image.

One approach is to use generalized match filtering to find thetranslation parameters that provide the best correlation. Anotherapproach is to continue to collect evidence about the orientation vectorcandidates, and provide a more comprehensive ranking of the orientationvectors based on all of the evidence gathered thus far. The followingparagraphs describe an example of this type of an approach.

To extract translation parameters, the detector proceeds as follows. Inthe multi-frame case, the detector selects the frame that produced 4Dorientation vectors with the highest detection values (1080). It thenprocesses the blocks 1082 in that frame in the order of their detectionvalue. For each block (1084), it applies the 4D vector to the luminancedata to generate rectified block data (1086). The detector then performsdual axis filtering (1088) and the window function (1090) on the data.Next, it performs an FFT (1092) on the image data to generate an arrayof Fourier data. To make correlation operations more efficient, thedetector buffers the fourier values at the orientation points (1094).

The detector applies a generalized match filter 1096 to correlate aphase specification of the orientation signal (1098) with thetransformed block data. The result of this process is a 2D array ofcorrelation values. The peaks in this array represent the translationparameters with the highest correlation. The detector selects the toppeaks and then applies a median filter to determine the center of eachof these peaks. The center of the peak has a corresponding correlationvalue and sub-pixel translation value. This process is one example ofgetting translation parameters by correlating the Fourier phasespecification of the orientation signal and the image data. Othermethods of phase locking the image data with a synchronization signallike the orientation signal may also be employed.

Depending on the implementation, the detector may have to resolveadditional ambiguities, such as rotation angle and flip ambiguity. Thedegree of ambiguity in the rotation angle depends on the nature of theorientation signal. If the orientation signal is octally symmetric(symmetric about horizontal, vertical and diagonal axes in the spatialfrequency domain), then the detector has to check each quadrant (0-90,90-180, 180-270, and 270-360 degrees) to find out which one the rotationangle resides in. Similarly, if the orientation signal is quadsymmetric, then the detector has to check two cases, 0-180 and 180-270.

The flip ambiguity may exist in some applications where the watermarkedimage can be flipped. To check for rotation and flip ambiguities, thedetector loops through each possible case, and performs the correlationoperation for each one (1100).

At the conclusion of the correlation process, the detector has produceda set of the top translation parameters with associated correlationvalues for each block. To gather additional evidence, the detectorgroups similar translation parameters from different blocks (1102),calculates a group detection value for each set of translationparameters 1104, and then ranks the top translation groups based ontheir corresponding group detection values 1106.

4.4 Refining Translation Parameters

Having gathered translation parameter estimates, the detector proceedsto refine these estimates. FIG. 18 is a flow diagram illustrating aprocess for refining orientation parameters. At this stage, the detectorprocess has gathered a set of the top translation parameter candidates1120 for a given frame 1122. The translation parameters provide anestimate of a reference point that locates the watermark, including boththe orientation and message components, in the image frame. In theimplementation depicted here, the translation parameters are representedas horizontal and vertical offsets from a reference point in the imageblock from which they were computed.

Recall that the detector has grouped translation parameters fromdifferent blocks based on their geometric proximity to each other. Eachpair of translation parameters in a group is associated with a block anda 4D vector (rotation, scale, and 2 differential scale parameters). Asshown in FIG. 18, the detector can now proceed to loop through eachgroup (1124), and through the blocks within each group (1126), to refinethe orientation parameters associated with each member of the groups.Alternatively, a simpler version of the detector may evaluate only thegroup with the highest detection value, or only selected blocks withinthat group.

Regardless of the number of candidates to be evaluated, the process ofrefining a given orientation vector candidate may be implemented in asimilar fashion. In the refining process, the detector uses a candidateorientation vector to define a mesh of sample blocks for furtheranalysis (1128). In one implementation, for example, the detector formsa mesh of 32 by 32 sample blocks centered around a seed block whoseupper right corner is located at the vertical and horizontal offsetspecified by the candidate translation parameters. The detector readssamples from each block using the orientation vector to extractluminance samples that approximate the original orientation of the hostimage at encoding time.

The detector steps through each block of samples (1130). For each block,it sets the orientation vector (1132), and then uses the orientationvector to check the validity of the watermark signal in the sampleblock. It assesses the validity of the watermark signal by calculating afigure of merit for the block (1134). To further refine the orientationparameters associated with each sample block, the detector adjustsselected parameters (e.g., vertical and horizontal translation) andre-calculates the figure of merit. As depicted in the inner loop in FIG.18 (block 1136 to 1132), the detector repeatedly adjusts the orientationvector and calculates the figure of merit in an attempt to find arefined orientation that yields a higher figure of merit.

The loop (1136) may be implemented by stepping through a predeterminedsequence of adjustments to parameters of the orientation vectors (e.g.,adding or subtracting small increments from the horizontal and verticaltranslation parameters). In this approach, the detector exits the loopafter stepping through the sequence of adjustments. Upon exiting, thedetector retains the orientation vector with the highest figure ofmerit.

There are a number of ways to calculate this figure of merit. One figureof merit is the degree of correlation between a known watermark signalattribute and a corresponding attribute in the signal suspected ofhaving a watermark. Another figure of merit is the strength of thewatermark signal (or one of its components) in the suspect signal. Forexample, a figure of merit may be based on a measure of the watermarkmessage signal strength and/or orientation pattern signal strength inthe signal, or in a part of the signal from which the detector extractsthe orientation parameters. The detector may computes a figure of meritbased the strength of the watermark signal in a sample block. It mayalso compute a figure of merit based on the percentage agreement betweenthe known bits of the message and the message bits extracted from thesample block.

When the figure of merit is computed based on a portion of the suspectsignal, the detector and reader can use the figure of merit to assessthe accuracy of the watermark signal detected and read from that portionof the signal. This approach enables the detector to assess the meritsof orientation parameters and to rank them based on their figure ofmerit. In addition, the reader can weight estimates of watermark messagevalues based on the figure of merit to recover a message more reliably.

The process of calculating a figure of merit depends on attributes thewatermark signal and how the embedder inserted it into the host signal.Consider an example where the watermark signal is added to the hostsignal. To calculate a figure of merit based on the strength of theorientation signal, the detector checks the value of each samplerelative to its neighbors, and compares the result with thecorresponding sample in a spatial domain version of the orientationsignal. When a sample's value is greater than its neighbors, then onewould expect that the corresponding orientation signal sample to bepositive. Conversely, when the sample's value is less than itsneighbors, then one would expect that the corresponding orientationsample to be negative. By comparing a sample's polarity relative to itsneighbors with the corresponding orientation sample's polarity, thedetector can assess the strength of the orientation signal in the sampleblock. In one implementation, the detector makes this polaritycomparison twice for each sample in an N by N block (e.g., N=32, 64,etc): once comparing each sample with its horizontally adjacentneighbors and then again comparing each sample with its verticallyadjacent neighbors. The detector performs this analysis on samples inthe mesh block after re-orienting the data to approximate the originalorientation of the host image at encoding time. The result of thisprocess is a number reflecting the portion of the total polaritycomparisons that yield a match.

To calculate a figure of merit based on known signature bits in amessage, the detector invokes the reader on the sample block, andprovides the orientation vector to enable the reader to extract codedmessage bits from the sample block. The detector compares the extractedmessage bits with the known bits to determine the extent to which theymatch. The result of this process is a percentage agreement numberreflecting the portion of the extracted message bits that match theknown bits. Together the test for the orientation signal and the messagesignal provide a figure of merit for the block.

As depicted in the loop from blocks 1138 to 1130, the detector mayrepeat the process of refining the orientation vector for each sampleblock around the seed block. In this case, the detector exits the loop(1138) after analyzing each of the sample blocks in the mesh definedpreviously (1128). In addition, the detector may repeat the analysis inthe loop through all blocks in a given group (1140), and in the loopthrough each group (1142).

After completing the analysis of the orientation vector candidates, thedetector proceeds to compute a combined detection value for the variouscandidates by compiling the results of the figure of merit calculations.It then proceeds to invoke the reader on the orientation vectorcandidates in the order of their detection values.

4.5 Reading the Watermark

FIG. 19 is a flow diagram illustrating a process for reading thewatermark message. Given an orientation vector and the correspondingimage data, the reader extracts the raw bits of a message from theimage. The reader may accumulate evidence of the raw bit values fromseveral different blocks. For example, in the process depicted in FIG.19, the reader uses refined orientation vectors for each block, andaccumulates evidence of the raw bit values extracted from the blocksassociated with the refined orientation vectors.

The reading process begins with a set of promising orientation vectorcandidates 1150 gathered from the detector. In each group of orientationvector candidates, there is a set of orientation vectors, eachcorresponding to a block in a given frame. The detector invokes thereader for one or more orientation vector groups whose detection valuesexceed a predetermined threshold. For each such group, the detectorloops over the blocks in the group (1152), and invokes the reader toextract evidence of the raw message bit values.

Recall that previous stages in the detector have refined orientationvectors to be used for the blocks of a group. When it invokes thereader, the detector provides the orientation vector as well as theimage block data (1154). The reader scans samples starting from alocation in a block specified by the translation parameters and usingthe other orientation parameters to approximate the original orientationof the image data (1156).

As described above, the embedder maps chips of the raw message bits toeach of the luminance samples in the original host image. Each sample,therefore, may provide an estimate of a chip's value. The readerreconstructs the value of the chip by first predicting the watermarksignal in the sample from the value of the sample relative to itsneighbors as described above (1158). If the deduced value appears valid,then the reader extracts the chip's value using the known value of thepseudo-random carrier signal for that sample and performing the inverseof the modulation function originally used to compute the watermarkinformation signal (1160). In particular, the reader performs anexclusive OR operation on the deduced value and the known carrier signalbit to get an estimate of the raw bit value. This estimate serves as anestimate for the raw bit value. The reader accumulates these estimatesfor each raw bit value (1162).

As noted above, the reader computes an estimate of the watermark signalby predicting the original, un-watermarked signal and deriving anestimate of the watermark signal based on the predicted signal and thewatermarked signal. It then computes an estimate of a raw bit valuebased on the value of the carrier signal, the assignment map that maps araw bit to the host image, and the relationship among the carrier signalvalue, the raw bit value, and the watermark signal value. In short, thereader reverses the embedding functions that modulate the message withthe carrier and apply the modulated carrier to the host signal. Usingthe predicted value of the original signal and an estimate of thewatermark signal, the reader reverses the embedding functions toestimate a value of the raw bit.

The reader loops over the candidate orientation vectors and associatedblocks, accumulating estimates for each raw bit value (1164). When theloop is complete, the reader calculates a final estimate value for eachraw bit from the estimates compiled for it. It then performs the inverseof the error correction coding operation on the final raw bit values(1166). Next, it performs a CRC to determine whether the read is valid.If no errors are detected, the read operation is complete and the readerreturns the message (1168).

However, if the read is invalid, then the detector may either attempt torefine the orientation vector data further, or start the detectionprocess with a new frame. Preferably, the detector should proceed torefine the orientation vector data when the combined detection value ofthe top candidates indicates that the current data is likely to containa strong watermark signal. In the process depicted in FIG. 19, forexample, the detector selects a processing path based on the combineddetection value (1170). The combined detection value may be calculatedin a variety of ways. One approach is to compute a combined detectionvalue based on the geometric coincidence of the top orientation vectorcandidates and a compilation of their figures of merit. The figure ofmerit may be computed as detailed earlier.

For cases where the read is invalid, the processing paths for theprocess depicted in FIG. 19 include: 1) refine the top orientationvectors in the spatial domain (1172); 2) invoke the translationestimator on the frame with the next best orientation vector candidates(1174); and 3) re-start the detection process on a new frame (assumingan implementation where more than one frame is available)(1176). Thesepaths are ranked in order from the highest detection value to thelowest. In the first case, the orientation vectors are the mostpromising. Thus, the detector re-invokes the reader on the samecandidates after refining them in the spatial domain (1178). In thesecond case, the orientation vectors are less promising, yet thedetection value indicates that it is still worthwhile to return to thetranslation estimation stage and continue from that point. Finally, inthe final case, the detection value indicates that the watermark signalis not strong enough to warrant further refinement. In this case, thedetector starts over with the next new frame of image data.

In each of the above cases, the detector continues to process the imagedata until it either makes a valid read, or has failed to make a validread after repeated passes through the available image data.

5.0 Operating Environment for Computer Implementations

FIG. 20 illustrates an example of a computer system that serves as anoperating environment for software implementations of the watermarkingsystems described above. The embedder and detector implementations areimplemented in C/C++ and are portable to many different computersystems. FIG. 20 generally depicts one such system.

The computer system shown in FIG. 20 includes a computer 1220, includinga processing unit 1221, a system memory 1222, and a system bus 1223 thatinterconnects various system components including the system memory tothe processing unit 1221.

The system bus may comprise any of several types of bus structuresincluding a memory bus or memory controller, a peripheral bus, and alocal bus using a bus architecture such as PCI, VESA, Microchannel(MCA), ISA and EISA, to name a few.

The system memory includes read only memory (ROM) 1224 and random accessmemory (RAM) 1225. A basic input/output system 1226 (BIOS), containingthe basic routines that help to transfer information between elementswithin the computer 1220, such as during start-up, is stored in ROM1224.

The computer 1220 further includes a hard disk drive 1227, a magneticdisk drive 1228, e.g., to read from or write to a removable disk 1229,and an optical disk drive 1230, e.g., for reading a CD-ROM or DVD disk1231 or to read from or write to other optical media. The hard diskdrive 1227, magnetic disk drive 1228, and optical disk drive 1230 areconnected to the system bus 1223 by a hard disk drive interface 1232, amagnetic disk drive interface 1233, and an optical drive interface 1234,respectively. The drives and their associated computer-readable mediaprovide nonvolatile storage of data, data structures,computer-executable instructions (program code such as dynamic linklibraries, and executable files), etc. for the computer 1220.

Although the description of computer-readable media above refers to ahard disk, a removable magnetic disk and an optical disk, it can alsoinclude other types of media that are readable by a computer, such asmagnetic cassettes, flash memory cards, digital video disks, and thelike.

A number of program modules may be stored in the drives and RAM 1225,including an operating system 1235, one or more application programs1236, other program modules 1237, and program data 1238.

A user may enter commands and information into the computer 1220 througha keyboard 1240 and pointing device, such as a mouse 1242. Other inputdevices may include a microphone, joystick, game pad, satellite dish,digital camera, scanner, or the like. A digital camera or scanner 43 maybe used to capture the target image for the detection process describedabove. The camera and scanner are each connected to the computer via astandard interface 44. Currently, there are digital cameras designed tointerface with a Universal Serial Bus (USB), Peripheral ComponentInterconnect (PCI), and parallel port interface. Two emerging standardperipheral interfaces for cameras include USB2 and 1394 (also known asfirewire and iLink).

Other input devices may be connected to the processing unit 1221 througha serial port interface 1246 or other port interfaces (e.g., a parallelport, game port or a universal serial bus (USB)) that are coupled to thesystem bus.

A monitor 1247 or other type of display device is also connected to thesystem bus 1223 via an interface, such as a video adapter 1248. Inaddition to the monitor, computers typically include other peripheraloutput devices (not shown), such as speakers and printers.

The computer 1220 operates in a networked environment using logicalconnections to one or more remote computers, such as a remote computer1249. The remote computer 1249 may be a server, a router, a peer deviceor other common network node, and typically includes many or all of theelements described relative to the computer 1220, although only a memorystorage device 1250 has been illustrated in FIG. 20. The logicalconnections depicted in FIG. 20 include a local area network (LAN) 1251and a wide area network (WAN) 1252. Such networking environments arecommonplace in offices, enterprise-wide computer networks, intranets andthe Internet.

When used in a LAN networking environment, the computer 1220 isconnected to the local network 1251 through a network interface oradapter 1253. When used in a WAN networking environment, the computer1220 typically includes a modem 1254 or other means for establishingcommunications over the wide area network 1252, such as the Internet.The modem 1254, which may be internal or external, is connected to thesystem bus 1223 via the serial port interface 1246.

In a networked environment, program modules depicted relative to thecomputer 1220, or portions of them, may be stored in the remote memorystorage device. The processes detailed above can be implemented in adistributed fashion, and as parallel processes. It will be appreciatedthat the network connections shown are exemplary and that other means ofestablishing a communications link between the computers may be used.

While the computer architecture depicted in FIG. 20 is similar totypical personal computer architectures, aspects of the invention may beimplemented in other computer architectures, such as hand-held computingdevices like Personal Digital Assistants, audio and/video players,network appliances, telephones, etc.

6.0 Color Adaptive Image Processing

In image processing applications, it is sometimes useful to be able tochange the colors of an image while reducing the visibility of thesechanges. Image watermarking is one application where it is desirable toalter image samples to encode information in a manner that is readilyrecoverable by an automated process, yet substantially imperceptible tohuman visual perception. Often, the aim of watermark encoding is tomaximize a watermark signal without significantly affecting imagequality. Since the eye is more sensitive to changes in memory colorssuch as flesh tones or blue sky, it is beneficial to have a method ofselectively controlling strength of a watermark in certain colorregions. The following description proposes a framework for selectivecolor masking of a watermark.

A watermark encodes auxiliary information in an image by making changesto image samples. A color masking framework maps a change in an imagesample attribute to an equivalent yet less perceptible change in thecolor values of that image sample. This mapping can be used to obtainequal perceptual watermark changes to image samples in other areas ofcolor space and to apply the change in the least visible color channels.

The mapping process has two primary inputs. One input to the mappingprocess is a desired change to an image attribute, which is dependent onthe watermark. A second input is a set of color values of an imagesample in the host image. Using these inputs, the mapping processcomputes a change in color components (or the final modified colorvalue) of the host image.

FIG. 21 is a flow diagram illustrating a process for color masking. Inthis process, a desired change in an attribute (1300) of an image sampleis mapped to changes in color components of the sample. A first stage(1302) of the process computes an adjustment for each color componentbased on the color values (1304) of an image sample. A second stage(1306) of the process takes the desired change in the image sampleattribute (1300) and the adjustments for each color component, anddetermines a change in each color component necessary to effect thedesired change in the image sample attribute. The process repeats foreach of the image samples to be modified (1308).

The first and second stages can be merged into one computation thattakes the input color vector of an image sample and change in an imagesample attribute for that sample, and computes changes in colorcomponents of the image sample. For example, the change in color valuescan be computed analytically as a function of a change in an imagesample attribute (like luminance or chrominance) and a color vectorassociated with the image sample.

The adjustment calculated in the first stage may be implemented as a setof scale factors that scale the change in the attribute of the imagesample into corresponding changes to each of the color components of theimage sample. The mapping of color components to a corresponding set ofscale factors may be pre-computed and stored in a look-up table. Forwatermarking applications, this look up table is invoked in watermarkencoding and, in some cases, decoding operations to determine a mappingbetween a change in an image sample attribute and corresponding changesin color components of the image sample.

Alternatively, the mapping of color components to a corresponding scalefactor may be computed analytically as a function of the colorcomponents during encoding and decoding operations.

As noted, one way to map a change in an image sample attribute to colorchanges is to use a look up table (LUT). In a look up table, the inputsto the mapping process are used as an index to look up the change incolor component. To illustrate a look up table for color mappingapplications, consider the following examples. A 3D LUT that makes a oneto one mapping of a luminance change to a color triplet is entirelycomprised of triplet entries having values 1.0, 1.0, 1.0, whichrepresent scaling factors that scale each color equally. Since for CMYKprint images

Luminance=0.3*C ₁+0.6*M ₁+0.1*Y ₁

-   Where, C₁M₁Y₁ are the equivalent cyan, magenta and yellow ink values    after black has been recombined. Thus a 3D LUT which does luminance    scaling along the gray axis, and changes to a color scaling for    saturated colors gradually changes from a 1.0, 1.0, 1.0 entry for    gray image samples to a color scale value (for example 0.0, 0.0,    10.0 for a saturated yellow image sample). The value for the    saturated color scaling for a given color triplet is calculated from    the desired luminance change of the watermark to give a similar    luminance change but in a color which introduces the least visual    artifacts.

Two considerations of the color masking framework are:

1. smooth transitions in and out of a color region;

2. a user interface for specifying a color region.

These considerations are explored further in implementations describedbelow.

6.1 Evaluating Visibility of Changes to Image Sample Attributes

Since the effectiveness of a color mapping process is dependent on thehuman visual system, one begins by investigating the sensitivity of thehuman eye to various color changes.

Research in the field of broadcast color television has made thefollowing observations about the sensitivity of human eyes to colors andcolor changes (See R. W. G. Hunt, ‘The Reproduction of Color inPhotography, Printing and Television’, pages 380-383):

-   1. Blue saving in NTSC, since the eye is about a fifth less    sensitive to high frequencies in blue-yellow than red-green.-   2. The eye is much less sensitive to high frequency changes in    chrominance than luminance. About 2.5 times the noise can be    tolerated in the color signal as the luminance signal.

The first observation may be exploited to reduce watermark visibility byconcentrating the watermark in the yellow/blue channel for printing. A3D Look Up Table (LUT) may perform a mapping to the yellow/blue channelautomatically, while changing to luminance scaling along the gray axis.The second item suggests changing the colors to move in a perpendiculardirection to the gray axis, so that the watermark is a chrominancechange. Once again a 3D LUT may perform this mapping automatically,while changing to luminance scaling along the gray axis.

The following sections describe two example watermark implementationsfor mapping changes in an image sample attributes to less visiblecolors. A first implementation takes a luminance change and color valuesof a host image and produces an equivalent luminance change to the hostimage in the colors less visible to the eye. Because the change toluminance is equivalent, the color mapping does not impact a watermarkdecoder that operates on luminance changes to extract the watermark.

A second implementation makes chrominance changes for certain colors. Insuch an implementation, the watermark decoder is designed to interpretchrominance changes correctly. The decoder should be implemented with a3D LUT compatible with the watermark encoder so that it measures colorchanges in the correct direction in color space. For example, a purechrominance change will produce no luminance change.

6.2 Mapping Luminance Changes

While the implementation details of watermark encoding schemes varysignificantly, a class of watermarking schemes can be modeled as anarray of changes to luminance values of a host image. The host imagecomprises an array of color vectors (e.g., an array of color tripletssuch as RGB, CMY, etc). The image sample may be represented as a vectorbetween black and the pixel color value. To encode a watermark, theluminance of the image sample may be increased or decreased as shown inFIG. 22. FIG. 22 shows a 3 dimensional color space with Cyan (C),Magenta (M) and Yellow (Y) axes. The bold axis between black and whiterepresents luminance. To make an equivalent luminance change in an imagesample of a given color vector (C1, Ml, Y1), one may make acorresponding scale to black as shown.

An alternative method of obtaining the same luminance change is to scalethe image sample like a vector between white and the sample's colorvalue as shown in FIG. 23. To make an equivalent luminance change, onemay make a corresponding scale to white as shown.

For the same luminance change, the visibility changes as shown in theTable below.

Scale to Black Scale to White Color Colors Modified/Visibility ColorsModified/Visibility yellow cyan/magenta - high yellow - low red cyan -high magenta/yellow - low green magenta - medium cyan/yellow - mediumBlue Yellow - low Cyan/magenta - high Cyan Magenta/yellow - low Cyan -high Magenta Cyan/yellow - medium Magenta - medium

By using the scale to white method for colors with high yellow contentsuch as yellow, red and green, and scale to black for blue, cyan andmagenta a lower visibility watermark can be encoded with the samedetectability.

Scaling to white results in the watermark being applied mainly to thedominant colors, and scaling to black implies that the watermark ismainly in the secondary colors. The yellow content can be calculatedusing a color opponent calculation as in Battiato et al, except usingCMY data after black has been recombined. See S. Battiato, D. Catalano,G. Gallo and R. Gennaro, ‘Robust watermarking for images based on colormanipulation’, Third International Image Hiding Workshop, 1999.

YBsat=2*Y ₁ −C ₁ −M ₁

-   And YBsat controls the ratio of ‘scale to white’ (ScaleToWhite) to    ‘scale to black’ (ScaleToBlack) watermark.

ChangeInLuminance=ScaleToBlack*(1−YBsat)+ScaleToWhite*YBsat

For print images, CMYK may be converted to an equivalent CMY color,which is used to index the 3D LUT.

The above color mapping may be implemented in a 3D LUT. The entries ofthe LUT include a set of CMY color vectors representing a sampling of acolor space. The number of color vector entries in the set can beminimized by making a representative sampling of the color space. Inpractice, several color vectors may correspond to a single color vectorentry in the table. Ideally, a given color vector should be associatedwith the color vector entry that is closest to it in the color space.The correspondence between a color vector in an input image and acorresponding color vector entry may be established by hashing the inputvector (e.g., truncating the least significant bit or bits) and thenmatching the hashed vector with a corresponding color vector entry inthe table.

Once the color vector entries are established, each of the entries isassociated with a set of scale factors. The set includes a scale factorfor each color component. The specific color components in theimplementation depend on the color format of the image. For example,images in an RGB format have scale factors for each of the R, G and Bcolor components. Similarly, images in a CMY format have scale factorsfor each of the C, M and Y components of each table entry. The scalefactors for each entry are derived by rewriting the above mathematicalexpression and solving for each color's scale factor as a function ofthe known color component values.

As an alternative to pre-computing the scale factors and storing them ina table, they may be computed during watermark encoding or decodingoperations in a similar manner used to construct the table.

6.3 Mapping to Chrominance Changes

A second color masking method maps a change in an image sample attributeto a change in chrominance for selected colors. This color maskingmethod may be used to map a change made to an image sample to encode awatermark to a chrominance change for image samples with colors thatfall in a specified color region.

Before describing an example of this approach, it is helpful to consideran illustration showing the relationship between chrominance andluminance changes. A measure of color saturation is to drop aperpendicular from a host image sample ^(C) ₁,M₁,Y₁ to the gray axis asshown in FIG. 24. C₀ is the minimum of (C₁,M₁,Y₁). The larger thedistance CS, the greater the color saturation. The distance CS is usedto change the mapping function from luminance to chrominance.

For values of CS close to zero, this mapping process uses a luminanceonly mapping, and for pure colors (and substantially pure colors), ituses a chrominance only mapping. This is may be achieved with a mappingfunction of the form:

mapping=CS*chrominance+(1−CS)*luminance

An example of a chrominance mapping would be to change yellow only,except near gray (where a yellow only change would be very visible). Acompatible decoder measures changes in the yellow channel (or blue forRGB detection), except near gray where it measures luminance changes. Bymatching color mapping in the encoder and decoder, a stronger watermarksignal can be extracted from watermarked images.

The type of mapping described in this section may be implemented in alook up table, or in a mathematical function evaluated during encodingor decoding operations.

6.4 Application of Color Adaptive Methods to Image Processing in aTransform Domain

Color masking may also be used in applications where images areprocessed in a transform domain, such as a Fourier, Wavelet, or DCTdomain, to name a few. In many of these applications, an image istransformed into an array of coefficients in a selected transformdomain, the coefficients are modified, and converted back into a spatialdomain. One such application is a transform domain watermark encodingprocess, where an image is transformed to a set of transformcoefficients, and selected coefficients are modified to encode anauxiliary message (typically a binary message of one or more bits orsymbols).

One way to implement color masking in a transform domain imageprocessing operation is to compute a characteristic color of an imageregion to be transformed into another domain and alter color componentsof the image region based on that characteristic color. As in the abovemethods, the characteristic color of an image region may be used to lookup the color channels to be modified to effect the desired changes tothe image. In a transform domain watermark encoding process, the changesmade to transform coefficients to encode a watermark can be targeted tospecific color channels for each image block. For example, colorchannels to which the watermark is applied are altered depending on acharacteristic color of an image block to be transformed to transformcoefficients for watermark encoding. The characteristic color may becomputed as an average, or DC component of the color for that block.

For watermark decoding, the characteristic color of an image block maybe used to look up a corresponding color channel or channels in which awatermark is expected to be encoded.

To illustrate color adaptive watermarking in a transform domain,consider the following example method. The encoding method computes acharacteristic color for a block of image samples. It uses thischaracteristic color to look up the color channels in which to embed thewatermark. The calculation of the color channels may be implemented in acolor look up table that maps in input color to a corresponding colorchannel or channels. Preferably, the watermark should be embedded incolor channels that are the least visible for the given characteristiccolor.

After determining the color channels in which to encode the watermark,the encoder converts image samples of the block into those colorchannels. Next, the encoder transforms the block into a transformdomain, alters the transform domain coefficients to encode an auxiliarysignal, and performs an inverse transform back into the block's originaldomain. The encoded block may be transformed into a desired color formatfor rendering or output.

The watermark decoder computes the characteristic color for the blockand looks up the color channel into which the watermark is expected tobe encoded. It then proceeds to decode the watermark from those colorchannels.

6.5 A User Interface for Controlling Watermark Encoding in Color Regions

Adaptive color masking can be further enhanced by empowering the user tocontrol how the watermark is applied to colors. This functionality canbe implemented by making a user interface that allows the user tospecify the intensity or strength of the watermark for specific colorsor color regions. A particularly useful way to implement thisfunctionality is to create an interactive user interface program thatenables the user to control watermark strength in designated colorregions and then immediately view the impact of the selected strength onthe image. Using this type of interactive interface, the user can seehow color specific changes to watermark strength impact visual qualityimmediately.

One way to allow the user to specify watermark strength for selectedcolors is to allow the user to specify a color region and an associatedcolor specific watermark strength parameter. Human eyes are sensitive toabrupt changes in color regions. As such, the watermark strengthparameter should be applied in a manner that makes smooth transitions ofwatermark strength to and from a designated color region. For example, acolor region may be defined by a start point C₁,M₁,Y₁, end pointC₂,M₂,Y₂ and a Gaussian half-width W_(g) as shown in FIG. 25. The volumeis like a fuzzy football in color space, which is defined by the user asexplained below.

To illustrate an example user interface, consider the followingimplementation. The image to be watermarked is displayed in an encoderapplication context (e.g., in the Adobe Photoshop image editing programwith a watermark encoder and decoder plug-in program). Within the userinterface of the image editing program, the a user selects ‘Define ColorRegion’ from within the ‘Embed Watermark’ box. The user moves the cursorover the region to be protected, clicking at the points to sample thepixel colors while the user interface displays visual feedback of thecolor region selected. A default Gaussian half-width W_(g) may be usedunless it is changed.

The strength of the watermark in this color region can then be setindependently of the overall watermark strength. The suggested defaultvalue would be say 50% of the overall watermark strength, if 50% of theimage is effected. The default would:

-   a) reduce, if a smaller percentage of the image was selected—for    example (50−20)% of overall watermark strength if 30% of image    selected.-   b) increase, if a larger percentage of the image was selected—for    example (50+20)% of overall watermark strength if 70% of image    selected.

In addition several default color regions (red, green, blue, cyan,magenta, yellow, white, black and neutral), selective color retouchwould be selectable. The watermark strength could be independently setfor each color region. All settings can be saved to, or restored from afile.

Clearly, this example represents only one possible implementation. Thereare many other ways to allow the user to specify watermark strength fordesignated colors.

6.6 Using Color Mapping as a Key

Any of the above methods are image dependent because the watermark isencoded into color channels that depend on the specific color values ofthe image samples in the image. The color mapping could be used as acolor key to determine the validity of a watermark. One way to check thevalidity is to check the color channels that contain a known watermarkand compare these color channels with those expected to contain thewatermark based on the color mapping key. Another way is to measure afigure of merit of a known watermark or watermark message payload in thecolor channels specified by the color mapping key. If the figure ofmerit falls below a threshold level, the detector can reject thewatermark as being invalid, or reject the signal as being unmarked.

The term, “known watermark,” refers to a watermark expected to be in animage suspected of containing a watermark based on knowledge of thewatermark encoder. One example of such a watermark is the watermarkorientation signal described above. Another example is a fixed watermarkmessage signal that is common to all images that employ a similarwatermark encoding process. To determine whether a watermark is valid,the detector calculates a figure of merit as described previously forthe watermark in the color channels where the watermark is expected tobe encoded based on the colors of the watermarked image. One such figureof merit is to measure the strength of a watermark orientation signal asdescribed previously. Another figure of merit is the percentageagreement calculation described previously. If the figure of merit doesnot surpass a set threshold, the detector deems the watermark to beinvalid, or the image to be unmarked.

The color mapping process, such as those described above, indicate thecolor region where the watermark will be the strongest based on thecolor values of the image samples in the suspect image. For example,using the implementation described above:

In red areas, the watermark should be encoded more strongly in magentaand yellow colors.

In blue areas, the watermark should be encoded more strongly in theyellow color.

The 3D LUT in effect acts as a key to which colors should be modified.This could be used to help counter certain types of attacks, since theattacker would not have the color key. For example, this could be usedwhere one attempts to forge a watermark without the color key or whereone attempts to copy a watermark from a different image. Since thewatermark is dependent on the color of the image, it will not be validwhen copied from a different image. In particular, it will likely not beencoded in the correct color channels based on the colors of the imageto which it is copied. As a result, the figure of merit measured for thewatermark in these color channels is likely to indicate that thewatermark is invalid.

7.0 Concluding Remarks

Having described and illustrated the principles of the technology withreference to specific implementations, it will be recognized that thetechnology can be implemented in many other, different, forms. Forexample, adaptive color masking can be applied in a variety of types ofwatermarking systems. It can also be applied in image and video codingapplications to reduce visibility of artifacts due to lossy compressiontechniques. To provide a comprehensive disclosure without undulylengthening the specification, applicants incorporate by reference thepatents and patent applications referenced above.

The particular combinations of elements and features in theabove-detailed embodiments are exemplary only; the interchanging andsubstitution of these teachings with other teachings in this and theincorporated-by-reference patents/applications are also contemplated.

1. A method comprising: determining a plurality of color attributesassociated with video or imagery; determining which samples representingthe video or imagery should receive digital watermarking based on theplurality of color attributes; transforming at least some of the samplesinto a transform domain; and utilizing a programmed electronicprocessor, modifying transform domain coefficients representing thesamples to hide the digital watermarking therein.
 2. A computer readablemedium on which is stored software or instructions to cause anelectronic processor to perform the method of claim
 1. 3. A programmedcomputing device comprising instructions stored in memory, saidinstructions are executable by said programmed computing device toperform the acts of claim
 1. 4. The method of claim 1 in which the colorattributes are for video.
 5. The method of claim 1 in which the colorattributes are for imagery.
 6. An apparatus comprising: electronicmemory for storing a plurality of color attributes associated with videoor imagery; an electronic processor programmed for: determining whichsamples representing the video or imagery should receive digitalwatermarking based on the plurality of color attributes; transforming atleast some of the samples into a transform domain; and utilizing aprogrammed electronic processor, modifying transform domain coefficientsrepresenting the samples to hide the digital watermarking therein. 7.The apparatus of claim 6 in which said electronic processor is operatingto perform at least one of the functions recited therein.
 8. The methodof claim 6 in which the color attributes are for video.
 9. The method ofclaim 6 in which the color attributes are for imagery.